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
I would like to report a problem dealing with DHT11 sensor readings using your library. It seems that the decimals for the temperature are missing. I'm only getting temperatures without decimal precision (it is always 0).
Here is the minimal code to reproduce the issue:
importtimeimportboardimportadafruit_dhtsensor=adafruit_dht.DHT11(board.D17)
whileTrue:
try:
temperature=sensor.temperaturehumidity=sensor.humidityprint(f"Temp: {temperature:.2f} °C, Hum: {humidity:.2f} %")
exceptRuntimeErrorase:
print(f"Reading from DHT failure: {e.args[0]}")
time.sleep(2)
continueexceptExceptionase:
sensor.exit()
raiseetime.sleep(2)
I'm getting this output always:
Temp: 28.00 °C, Hum: 64.00 %
Temp: 27.00 °C, Hum: 64.00 %
Temp: 28.00 °C, Hum: 64.00 %
The text was updated successfully, but these errors were encountered:
Hello Adafruit Devs,
I would like to report a problem dealing with DHT11 sensor readings using your library. It seems that the decimals for the temperature are missing. I'm only getting temperatures without decimal precision (it is always 0).
Here is the minimal code to reproduce the issue:
I'm getting this output always:
The text was updated successfully, but these errors were encountered: