import time
import board
import adafruit_dht
dht = adafruit_dht.DHT11(board.GP5)
while True:
try:
hum = dht.humidity
temp = dht.temperature # Celsius
print(f"RH = {hum:.0f} %")
print(f"temp:{temp:.1f}")
except RuntimeError as e:
print("Read error")
time.sleep(2)