Skip to content

Wrong values (overflow) #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions DHT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,14 @@ boolean DHT::read(bool force) {
// and we don't want any interruptions.
InterruptLock lock;

//https://github.com/adafruit/DHT-sensor-library/issues/48
// End the start signal by setting data line high for 40 microseconds.
digitalWrite(_pin, HIGH);
delayMicroseconds(40);
//digitalWrite(_pin, HIGH);
//delayMicroseconds(40);
// WEB: This is an error. DHT tries to pull the line low as soon as it came back to high.
// therefore the low-high transition after the start signal "low" needs to be realised by
// the pullup resistor only, uC pin must already be in INPUT mode.


// Now start reading the data line to get the value from the DHT sensor.
pinMode(_pin, INPUT_PULLUP);
Expand Down