from machine import pin,softI2C
from time import sleep
import dht
from i2c_lcd import i2c_lcd
dht_pin=27
dht_sensor=dht.DHT22(Pin.dht_pin)
led_pin=17
led=Pin(led_pin,Pin_OUT)
LCD_SDA_PIN=19
LCD_SCL_PIN=22
i2c=softI2C(scl=Pin.LCD_SDA_PIN),sda=Pin.LCD_SCL_PIN,freq=1000000)
lcd=i2c_lcd(i2c,0x27,2,16)
while True:
dht_sensor.measure()
sleep(5)
temp=dht_sensor.temperature()
humidity=dht_sensor.humidity()
if(temp<20)
lcd.value(1)
else
lcd.value(0)
lcd.clear()
lcd.putstr("temp:"format.temp)
lcd.putstr("humidity:"format.humidity)
sleep()