from machine import Pin, SoftI2C
from i2c_lcd import I2cLcd
def connectLcd():
i2c = SoftI2C(scl=Pin(22), sda=Pin(21), freq=100000)
devices = i2c.scan()
if len(devices) == 0:
raise NameError("No i2c device !")
return I2cLcd(i2c, devices[0], 2, 16)
lcd = connectLcd()
while True:
lcd.putstr("Linuxhint.com")
lcd.move_to(0, 1)
lcd.putchar("0")
# sleep(10)
# lcd.clear()