Open FlorianWendelborn opened 8 years ago
You're right, I cast the number to an integer in C++, and expect an unsigned integer in the scheduler. So putting any decimal number truncate it.
Secondly the DHT22 can only be read every two seconds, that's why you may have error (because the checksum don't match), or even strange/corrupted data like 0°C.
I think I should have added a way to check frequences based on a sensor to avoid that type of issue, I'll look into it.
Given that you include a note about that in the README, you could also buffer the last reading and if a program attempts to read it again within too few time it just delivers the old result.
Description
fetchInterval
pulls far more often than twice per second. Resulting data is corrupted. My guess is that you're using an integer for that, and only allow seconds. Then the program automatically rounds it down, to make it fit intoint
.My Code
Log output
Software
Hardware
Raspberry Pi 3