from machine import Pin
import time
import dht

d = dht.DHT22(Pin(2))

while True:
    d.measure()
    print("Temp: ", end=" ")
    print(d.temperature(), end=" ")
    print("hum: ", end=" ")
    print(d.humidity())
    time.sleep(1)