Skip to content

Stopped working in the latest esp32 library #7

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
htmltiger opened this issue Mar 13, 2022 · 4 comments · Fixed by #8
Closed

Stopped working in the latest esp32 library #7

htmltiger opened this issue Mar 13, 2022 · 4 comments · Fixed by #8

Comments

@htmltiger
Copy link
Contributor

htmltiger commented Mar 13, 2022

Hi,

I have been using this for some time and working fine but since this commit
espressif/arduino-esp32#6259
or something around that time stopped working.
the last known good working arduino-esp32 was downloaded on 13/02/2022 and is working fine but newer versions it don't get any temperature values.
Please check if there is something that is stopping the show.

Thank you.

@bertmelis
Copy link
Owner

Willdo.

@htmltiger
Copy link
Contributor Author

replaced the following 2 files from 13/02 version and it worked so its confirmed that 6259 is the one that affects this.

cores/esp32/esp32-hal-gpio.c
cores/esp32/esp32-hal-gpio.h

@bertmelis
Copy link
Owner

bertmelis commented Mar 15, 2022

The problem is that on ESP32 the pin that is used for communicating with the DHT sensor has to be switched from "GPIO" to "RMT" and this takes a certain amount of time. Switching before the RMT is ready results in losing the first pulses. Switching too late obviously has the same result.

The actual switching is done here:
https://github.com/bertmelis/esp32DHT/blob/master/src/esp32DHT.cpp#L111

Unfortunately I haven't found a reliable way to do this just in time. So whenever the underlying code (Arduino framework) changes, the timing might be off and the library stops working.

So I have to build my test setup again and do some trial and error with the logic analyzer.

@htmltiger
Copy link
Contributor Author

thanks for the pointers, i have managed to track the changes and created the pull.

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

Successfully merging a pull request may close this issue.

2 participants