Open argltuc opened 3 years ago
I tried to repeat the bug with an ESP32 but all negative celsius temperatures that I got (though I did not get -0.1 in particular) seemed correct to me. Does this only concern -0.1C in partocular?
If i remember correctly all negative values were wrong. Less temperature results in respective higher value then -3278.6. Currently i can't repeat my measurements, since all my DHT22 sensor are used and fully integrated in some projects.
I have been seeing this issue and have yet to narrow down on the cause.
I'm using version 1.4.4 of this library and building with PlatformIO:
I've observed it twice now. On both occasions the temperature decreased, crossing 0 degrees, over the course of roughly an hour.
I'll be investigating the issue and will provide an update should I find anything notable.
I know this thread is quite a bit old but I couldn't find any real solution to the problem. I'm using v1.4.6 of this library (on an ESP8266) and I can confirm the problem is real.
I use the DHT22 in combination with an ESP8266 and this lib. When having negative temperatures, the resulting value of readTemperature() is -3278.6 at -0.1°C To fix negatives values a recalculation is nessecary:
after some research, i figure out, that the values in data-array repressents an intager in ones complement, while the rest of data handling seems to be in BCD. I will provide an PR to fix this issue.