- CODE: SELECT_ALL_CODE
import dht
import machine
import utime
pin = machine.Pin(1)
data_dht = dht.DHT11(pin)
while True:
utime.sleep(2)
data_dht.measure()
print()
print ( f" temperature (C) :{data_dht.temperature()}")
print ( f" humidity (%): {data_dht.humidity()} ")
But I receive this error:
Traceback (most recent call last):
File "<stdin>", line 11, in <module>
File "dht.py", line 25, in measure
OSError: [Errno 110] ETIMEDOUT
Does someone have a solution for this