from machine import Pin
from dht import DHT22
from time import sleep
cap_temp = DHT22(12)
while True:
cap_temp.measure()
temp = cap_temp.temperature()
humid = cap_temp.humidity()
print(f"Température : {temp} °C")
print(f"Humidité : {humid} %")
sleep(2)