from machine import I2C, Pin
import esp8266_i2c_lcd as esp8266_lcd
from time import sleep
i2c = I2C(0) #Using hardware I2C channel 0
lcd = esp8266_lcd.I2cLcd(i2c,esp8266_lcd.DEFAULT_I2C_ADDR, 2, 16)
lcd.clear()
counter = 0
while True:
lcd.move_to(0,0)
lcd.putstr("2*16 LCD demo")
lcd.move_to(0,1)
counter = counter + 1
lcd.putstr("Counter : %d" % (counter))
print("Counter : %d" % (counter))
sleep(1)