local busid = 0 -- I2C Bus ID. Always zero
local sda= 4 -- GPIO2 pin mapping is 4
local scl= 3 -- GPIO0 pin mapping is 3
i2c.setup(busid,sda,scl,i2c.SLOW)
lcd = dofile("lcd1602.lua")()
lcd.light(0)
lcd.locate(0,0)
lcd.put("Hello World!")
get error:
lcd1602.lua:36: attempt to index a number value
stack traceback:
lcd1602.lua:36: in function 'light'
init.lua:9: in main chunk
[C]: in function 'dofile'
stdin:1: in main chunk
>
init.lua:
get error: