from machine import Pin, I2C
from esp8266_i2c_lcd import I2cLcd
from time import sleep
i2c = I2C(sda=Pin(21),scl=Pin(22), freq=400000)
lcd = I2cLcd(i2c, 0x27, 2 ,16)
counter = 0
while True:
lcd.move_to(0,0)
lcd.putstr("2x16 LCD demo")
lcd.move_to(0,1)
counter = counter + 1
lcd.putstr("Counter: %d" %(counter))
sleep(1)