from machine import Pin
from time import sleep
import dht import DHT22

# Create a DHT22 sensor object on GPIO Pin 22
dht=DHT22(Pin(15))
# Alternatively, you can use DHT11 by uncommenting the line below
# sensor = dht.DHT11(Pin(22))
while True:
   dht.measure()
   temp=dht.temparature()
   hum=dht.humidity()
   print(f"Temparature:{temp}0Humidity:{hum}%")
   sleep(5)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT