We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
RMT starts counting from first high pulse. This results in measuring the time of Treh and Tlow of bit 39. https://files.seeedstudio.com/wiki/Grove-Temperature_and_Humidity_Sensor_Pro/res/AM2302-EN.pdf
The reason that it works is because the DHT has a low pulse after bit0 (Ten) which happens to have the same width with Tlow and rmt counts it as bit0.
According to the datasheet the minimum width of the measured pulses here https://github.com/bertmelis/esp32DHT/blob/master/src/esp32DHT.cpp#L135 is 123us and the average 130us (exactly the limit)
Also an improvement would be here https://github.com/bertmelis/esp32DHT/blob/master/src/esp32DHT.cpp#L144 to change to data[i].duration0 + data[i-1].duration1;
data[i].duration0 + data[i-1].duration1;
The text was updated successfully, but these errors were encountered:
Nice capture. I don't have a scope so it was trial and error getting the pin the switch from digital output to RMT input.
I'll have a closer look but a PR with a "better" scope image is welcome.
Sorry, something went wrong.
No branches or pull requests
RMT starts counting from first high pulse. This results in measuring the time of Treh and Tlow of bit 39.
https://files.seeedstudio.com/wiki/Grove-Temperature_and_Humidity_Sensor_Pro/res/AM2302-EN.pdf
The reason that it works is because the DHT has a low pulse after bit0 (Ten) which happens to have the same width with Tlow and rmt counts it as bit0.
According to the datasheet the minimum width of the measured pulses here https://github.com/bertmelis/esp32DHT/blob/master/src/esp32DHT.cpp#L135 is 123us and the average 130us (exactly the limit)
Also an improvement would be here https://github.com/bertmelis/esp32DHT/blob/master/src/esp32DHT.cpp#L144 to change to
data[i].duration0 + data[i-1].duration1;
The text was updated successfully, but these errors were encountered: