import dht
from machine import Pin
from time import sleep
led = Pin(27,Pin.OUT)
capteur = dht.DHT22(Pin(4))
while True:
capteur.measure()
print("il fait ",capteur.temperature(), "°C")
if capteur.temperature() <= 0:
led.value(1)
else:
led.value(0)
sleep(0.1)
'