from i2c_lcd import I2cLcd
from machine import Pin, I2C
from time import sleep
i2c = I2C(0, scl=Pin(9), sda=Pin(8), freq=400000) #fromat in libary file
print(i2c.scan()) #getting addres off the display
I2C_ADDR = i2c.scan()[0]
lcd = I2cLcd(i2c, I2C_ADDR, 2, 16) # Example address and dimensions
while True:
lcd.putstr("Hello world!")
sleep(5)
lcd.clear()
sleep(1)