Post your best Lua script examples here

User avatar
By eagle1
#36994 hi,

I write simple blink code and it doesn't work on all 3 nodeMCU boards I have

1. I flash the board multiple times
2. I connect it at equal baud rates


what's the problem?

Code: Select allwhile 1 do
gpio.write(0,gpio.HIGH)
tmr.delay(10000)
gpio.write(0,gpio.LOW)
tmr.delay(10000)
end
Last edited by eagle1 on Wed Dec 30, 2015 7:46 am, edited 1 time in total.
User avatar
By forlotto
#37045 you must either save it as init.lua

or make an init.lua that will do some stuff then execute the file using dofile(filename.lua)

hope this helps

PS if you have 3 boards you should head on over to the mmiscool basic section and give that a try ...

hook one of them up with Basic you will have a lot easier time doing so just follow my guide in the signature!

Enjoy!