mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2023-10-23 22:20:38 +03:00
clarified the pullup
This commit is contained in:
parent
b05219ab42
commit
31b6b45352
@ -6,13 +6,14 @@
|
|||||||
#define DHTPIN 2 // what pin we're connected to
|
#define DHTPIN 2 // what pin we're connected to
|
||||||
|
|
||||||
// Uncomment whatever type you're using!
|
// Uncomment whatever type you're using!
|
||||||
//#define DHTTYPE DHT11 // DHT 11 works
|
//#define DHTTYPE DHT11 // DHT 11
|
||||||
#define DHTTYPE DHT22 // DHT 22 (AM2302)
|
#define DHTTYPE DHT22 // DHT 22 (AM2302)
|
||||||
//#define DHTTYPE DHT21 // DHT 21 (AM2301)
|
//#define DHTTYPE DHT21 // DHT 21 (AM2301)
|
||||||
|
|
||||||
// Connect pin 1 (on the left) of the sensor to +5V
|
// Connect pin 1 (on the left) of the sensor to +5V
|
||||||
// Connect pin 2 of the sensor to whatever your DHTPIN is
|
// Connect pin 2 of the sensor to whatever your DHTPIN is
|
||||||
// Connect pin 4 (on the right) of the sensor to GROUND
|
// Connect pin 4 (on the right) of the sensor to GROUND
|
||||||
|
// Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor
|
||||||
|
|
||||||
DHT dht(DHTPIN, DHTTYPE);
|
DHT dht(DHTPIN, DHTTYPE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user