from machine import Pin
from time import sleep
import dht
Ledr=Pin(21,Pin.OUT)
Ledo=Pin(25,Pin.OUT)
buzzer=Pin(22,Pin.OUT)
cap=Pin(26,Pin.OUT)
d=dht.DHT22(cap)
while True:
d.measure()
t=d.temperature()
print("temperature=",t,"C")
if t < 14:
Ledr.on()
elif 14 <=t<20
Ledb.on()
else :
ledv.on()
sleep(5)