You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, your thought is correct. For measuring sub-zero temperatures, these lines of code should be added.
# DHT11 will return 1 in MSB of the_bytes[3] when sub-zero temperature.
if not bits[24]:
temperature = the_bytes[2] + float(the_bytes[3]) / 10
else:
temperature = 0.0 - the_bytes[2] - float(the_bytes[3] - 128) / 10
Hi,
I am Naohiko Yamaguchi from Japan.
Perhaps, this program can't return correct temperature data when sub-zero temperature.
Current code for calculate Temperature/Humidity is below.
DHT11 will return 1 in MSB of the_bytes[3] when sub-zero temperature.
However, current code is not support this specific.
Otherwise, am I wrong?
The text was updated successfully, but these errors were encountered: