import dht
from machine import Pin
from time import sleep
sensor = dht.DHT22(Pin(5))
while True:
sleep(2)
sensor.measure()
temp = sensor.temperature()
temp_f = temp*(9/5) +32.0
hum = sensor.humidity()
print("Temperature: %3.1f C"%temp)
print("Humidity: %3.1f %%"%hum)
print("Temperature inn Fahrenheit: %3.1f F",%temp_f)