Major problems doing anything in LUA
Posted: Thu Jun 04, 2015 7:50 am
I've had great luck using the ESP-01 with the Arduino IDE but nothing but problems using LUA. If you can offer any help and tell me what i'm doing wrong it would be great.
-using the NodeMCU v0.9 hardware
- using ESP8266Flasher.exe flashed 0.9.5 (nodemcu_20150213.bin)
- in ESP8266Flasher clicked the Config tab, x on the top line & selected nodemcu_20150213.bin
- in ESP8266Flasher clicked the Advanced tab took a guess and set Baudrate to 11520, Flash size to 512kByte, 40Mhz, DIO
- used the latest ESPlorer, connects ok
- tried an LED blink test but see this error
Connected an i2c oled to D5 & D6
- opened u8g_graphics_test.lua
- left code as is because SDA = 5 & SCL = 6 are correct as well as address 0x3c
-Clicked Send to ESP button, then Run button but it's blank
Mike
-using the NodeMCU v0.9 hardware
- using ESP8266Flasher.exe flashed 0.9.5 (nodemcu_20150213.bin)
- in ESP8266Flasher clicked the Config tab, x on the top line & selected nodemcu_20150213.bin
- in ESP8266Flasher clicked the Advanced tab took a guess and set Baudrate to 11520, Flash size to 512kByte, 40Mhz, DIO
- used the latest ESPlorer, connects ok
- tried an LED blink test but see this error
Code: Select all
NodeMCU firmware detected.
=node.heap()
22560
lighton=0
tmr.alarm(1,1000,1,function()
if lighton==0 then
lighton=1
led(512,512,512)
else
lighton=0
led(0,0,0)
end
end)
PANIC: unprotected error in call to Lua API (stdin:4: attempt to call global 'led' (a nil value))
H!ˆÈ©�ŽF
¥•ŽDH
ÊôŒ¦¨HøNodeMcu 0.9.5 build 20150213 powered by Lua 5.1.4
lua: cannot open init.lua
Connected an i2c oled to D5 & D6
- opened u8g_graphics_test.lua
- left code as is because SDA = 5 & SCL = 6 are correct as well as address 0x3c
-Clicked Send to ESP button, then Run button but it's blank
Mike