from machine import Pin, SoftI2C
from i2c_lcd import I2cLcd
import time
import dht
i2c = SoftI2C(scl=Pin(14), sda=Pin(12),freq=100000)
lcd = I2cLcd(i2c, 0x27,2,16)
time.sleep(1)
lcd.clear()
d = dht.DHT11(Pin(15))
t = 0
h = 0
text = 'Starting...'
lcd.putstr(text)
while True:
sensor.measure()
t = sensor.temperature()
h = sensor.humidity()