-
Notifications
You must be signed in to change notification settings - Fork 2
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
Init sequence wrong? #3
Comments
Max tgo is 200us. Shouldnt you wait max, or poll until ready? Only 30us wait might not be enough. This may be true for other waits too. Otherwise fix seems good, it at least keeps the original functionality. |
The Tgo (data low) timing is generated by the master (microcontroller). According to the datasheet, this must be within minimum 20us and maximum 200us. The pinMode() and delayMicroseconds() calls are also time consuming, so the typical 30us seems to be a reliable value. Next data pulses are generated by the sensor. I'll enter the test phase... |
Will be sufficient in most cases. For ultimate robustness on all platforms, especially fast ones, polling loops would be best. But for now, have fun testing 😀 |
Tested on:
Fixed in commit fb62275. |
Looks good, closing issue. |
Found this issue on the Adafruit dht11/22 library:
adafruit/DHT-sensor-library#48
It looks valid what the issue states. You have that same initialization sequence. Maybe verify if the libary needs to be patched?
The text was updated successfully, but these errors were encountered: