General area when it fits no where else

Moderator: Mmiscool

User avatar
By Erwin Flores
#64724 Greetings. I need help to run an LCD display with i2c interface. I already tried some forms of code but it does not work for me. I leave my little program and I hope someone corrects me that there is my mistake.

Thank you

i2c.setup(D3,D4)
for address = 1 to 127
i2c.begin(address)
stat = i2c.end()

if stat < 1 then
' print stat
wprint "Found I2C device at address: 0x" & hex(address)
wprint " - > " & address
wprint " <br>"
endif
next
gosub [lcdinit]
lcdprint "Hola Mundo",1,1
wait

[lcdinit] 'this the init secuency, but not work!!!
i2c.begin(63) 'Find the module in address 63
lcdsend 2, 2
lcdsend 40, 2
lcdsend 12, 2
lcdsend 6, 2
lcdsend 1, 2
return