We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c978977 commit 3a86e46Copy full SHA for 3a86e46
DHT.cpp
@@ -152,8 +152,12 @@ boolean DHT::read(bool force) {
152
InterruptLock lock;
153
154
// End the start signal by setting data line high for 40 microseconds.
155
- digitalWrite(_pin, HIGH);
156
- delayMicroseconds(40);
+ //digitalWrite(_pin, HIGH);
+ //delayMicroseconds(40);
157
+ //WEB: This is an error. DHT tries to pull the line low as soon as it came back to high.
158
+ // therefore the low-high transition after the start signal "low" needs to be realised by
159
+ // the pullup resistor only, uC pin must already be in INPUT mode.
160
+ // Fixes issue 48: https://github.com/adafruit/DHT-sensor-library/issues/48
161
162
// Now start reading the data line to get the value from the DHT sensor.
163
pinMode(_pin, INPUT_PULLUP);
0 commit comments