from machine import Pin
from time import sleep
import dht
sensor = dht.DHT22(Pin(19))
led1 = Pin(17,Pin.OUT)
while True:
led1.on()
sleep(1)
led1.off()
sleep(1)
sleep(1)
sensor.measure()
temp = sensor.temperature()
humi = sensor.humidity()
print('tmeperature: %3.2f c' %temp)
print('Humidity: %3.1f %%' %humi)
print('by punyaphorn ')