from machine import Pin, I2c
from utime import sleep_us, ticks_us, sleep,sleep_ms
from machine import Pin, SoftI2C, dht22
from i2c_lcd import I2cLcd
from utime import sleep



i2c = SoftI2C(sda=Pin(23), scl=Pin(22), freq =10000)
lcd = I2cLcd(i2c, 0x27, 2, 16)

dht = dht22.DHT22(i2c=i2c)
lcd.prints('temper: ',0,0)
lcd.prints('press: ',0,1)
while True:
    data=dht.values()
    lcd.prints(data[0],8,0)
    lcd.prints(data[1],7,1)
    time.sleep_ms(1000)