# Esp32 más LCD-I2C con Python
# Librerías
from machine import Pin, I2C, sleep,SoftI2C
from lcd_api import LcdApi
from i2c_lcd import I2cLcd
import time
# Crear los objetos
I2C_ADDR = 0x27
totalRows = 2
totalColumns = 16
# Iniciar I2C
i2c = SoftI2C(scl=Pin(22), sda=Pin(21), freq=10000)
lcd = I2cLcd(i2c, I2C_ADDR, totalRows, totalColumns)
while True:
lcd.putstr('Hi world en esp32')
time.sleep(2)
lcd.clear()