mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2023-10-23 22:20:38 +03:00
Change initial HIGH delay, fix comments in examples
This commit is contained in:
parent
d26e8ec729
commit
d6488c1fbe
2
DHT.cpp
2
DHT.cpp
@ -171,7 +171,7 @@ bool DHT::read(bool force) {
|
|||||||
pinMode(_pin, INPUT_PULLUP);
|
pinMode(_pin, INPUT_PULLUP);
|
||||||
|
|
||||||
// Now start reading the data line to get the value from the DHT sensor.
|
// Now start reading the data line to get the value from the DHT sensor.
|
||||||
delayMicroseconds(60); // Delay a bit to let sensor pull data line low.
|
delayMicroseconds(40); // Delay a bit to let sensor pull data line low.
|
||||||
|
|
||||||
// Turn off interrupts temporarily because the next sections
|
// Turn off interrupts temporarily because the next sections
|
||||||
// are timing critical and we don't want any interruptions.
|
// are timing critical and we don't want any interruptions.
|
||||||
|
@ -5,13 +5,15 @@
|
|||||||
|
|
||||||
// REQUIRES the following Arduino libraries:
|
// REQUIRES the following Arduino libraries:
|
||||||
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
|
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
|
||||||
// - Adafruit Unified Sensor Library: https://github.com/adafruit/Adafruit_Sensor
|
// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor
|
||||||
|
|
||||||
#include <Adafruit_Sensor.h>
|
#include <Adafruit_Sensor.h>
|
||||||
#include <DHT.h>
|
#include <DHT.h>
|
||||||
#include <DHT_U.h>
|
#include <DHT_U.h>
|
||||||
|
|
||||||
#define DHTPIN 2 // Pin connected to the DHT sensor.
|
#define DHTPIN 2 // Digital pin connected to the DHT sensor
|
||||||
|
// Feather HUZZAH ESP8266 note: use pins 3, 4, 5, 12, 13 or 14 --
|
||||||
|
// Pin 15 can work but DHT must be disconnected during program upload.
|
||||||
|
|
||||||
// Uncomment the type of sensor in use:
|
// Uncomment the type of sensor in use:
|
||||||
//#define DHTTYPE DHT11 // DHT 11
|
//#define DHTTYPE DHT11 // DHT 11
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
|
|
||||||
// REQUIRES the following Arduino libraries:
|
// REQUIRES the following Arduino libraries:
|
||||||
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
|
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
|
||||||
// - Adafruit Unified Sensor Library: https://github.com/adafruit/Adafruit_Senso
|
// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor
|
||||||
|
|
||||||
#include "DHT.h"
|
#include "DHT.h"
|
||||||
|
|
||||||
#define DHTPIN 2 // what digital pin we're connected to
|
#define DHTPIN 2 // Digital pin connected to the DHT sensor
|
||||||
|
// Feather HUZZAH ESP8266 note: use pins 3, 4, 5, 12, 13 or 14 --
|
||||||
|
// Pin 15 can work but DHT must be disconnected during program upload.
|
||||||
|
|
||||||
// Uncomment whatever type you're using!
|
// Uncomment whatever type you're using!
|
||||||
//#define DHTTYPE DHT11 // DHT 11
|
//#define DHTTYPE DHT11 // DHT 11
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=DHT sensor library
|
name=DHT sensor library
|
||||||
version=1.3.1
|
version=1.3.2
|
||||||
author=Adafruit
|
author=Adafruit
|
||||||
maintainer=Adafruit <info@adafruit.com>
|
maintainer=Adafruit <info@adafruit.com>
|
||||||
sentence=Arduino library for DHT11, DHT22, etc Temp & Humidity Sensors
|
sentence=Arduino library for DHT11, DHT22, etc Temp & Humidity Sensors
|
||||||
|
Loading…
Reference in New Issue
Block a user