from machine import Pin
from time import sleep
import dht

sensor = dht.DHT22(Pin(22))

while True:
    sensor.measure()
    temp = sensor.temperature()
    hum = sensor.humidity()
    print("Temperature {}C Humidity : {:.0f}%".format(temp,hum))
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT