Skip to content
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

Just DHT-timeout #1

Open
gdampf opened this issue Mar 2, 2018 · 4 comments
Open

Just DHT-timeout #1

gdampf opened this issue Mar 2, 2018 · 4 comments

Comments

@gdampf
Copy link

gdampf commented Mar 2, 2018

Trying with current esp-idf (End Feb. 2018), this code is not running as expected. Output produced:
=== Reading DHT ===␍␊
[08:13:21:124] DHT: Sensor Timeout␍␊
[08:13:21:124] ␍␊
[08:13:21:124] Hum 0.0␍␊
[08:13:21:124] Tmp 0.0

Sensor is connected to GPIO15, working well with Arduino-Library, but not with this one. Only adaption made: Change DHT_main.c:23 into "setDHTgpio( 15 );".

@gosouth
Copy link
Owner

gosouth commented Mar 2, 2018

Sorry, I'm very outdated, I need to remember what I did...

What version of ESP-IDF are you using? I used ESP-IDF v2.1. I think CPU Crystal frequency changed, so timing returning in getSignalLevel () may be different. I don't like this logic. It needs some interrupt blocking / priority to ensure it runs in realtime.

@suryamurugan
Copy link

Just check if your sensor is connected properly ! I got the same error when i disconnected the sensor. check(Screenshot) them before and after disconnecting the sensor .

Connected :
connected

Disconnected :
disconnected

@tinkerer2a
Copy link

I had similar issues, using an ESP32-CAM module. Got it solved by making sure the pin I was using was correctly configured as gpio by calling "gpio_pad_select_gpio" before using the DHT-library.

@loman1978
Copy link

The problem is the time! the 1uS delay is not a real 1uS delay (verified with oscilloscope) . This means you have to "calibrate" your timing". I reviewed the rotine to read the low and high level and it works better.
I suggest also do not update the temeprature and humidity before checking the checksum! This is an error. The final values should be updated only if the checksum is verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants