As the title says... Chat on...

User avatar
By salomonsk8r2003
#14393 Sorry, I didnt realize I cant edit a post after posting. This will be the last one.

This is the picture that made me realize that the init.lua is maybe not supposed to be the primary "looping" code. Should I put just "Setup" type one-time code in init.lua such as wifi connection info and then put the rest of my looping code somewhere else?

http://www.slideshare.net/geekscape/nod ... workshop-1
Attachments
nodemcu-esp8266-workshop-1-31-638.jpg
This is the slide that made me realize I was doing something wrong.
User avatar
By salomonsk8r2003
#14862 Well I tried the last firmware and still this thing works sometimes and then it just stops working out of nowhere and I have to reflash everything.

Is there a specific firmware that people have had a good experience with? I really dont want to give up on the esp8266 but I'm running out of ideas.

What power supplies are you guys using?
User avatar
By gsker
#14881 I recommend you install 20150213. https://github.com/nodemcu/nodemcu-firm ... 150213.bin I also installed a newer one and had lots of problems.

Edit: I'm using one of these: http://www.electrodragon.com/product/es ... ter-board/ which has a voltage regulator on it, then for power I use the 5v directly from my FTDI adaptor if I want to do UART connections, otherwise I just use any old 5v adapter and make sure a telnet server is started by a tmr.alarm() in init.lua.
Like this
Code: Select alltmr.alarm(3, 5000, 0, function()   dofile("telnet") end )
User avatar
By TerryE
#14891 BTW, the statement that init.lua can't be compiled is wrong. The loader differentiates between source and compiled files from the <ESC>Lua header that prefixes compiled code; the use of the extension lua or lc is just a convention. You can do a node.compile() of init.lua and move the .lc file over the original .lua and everything works fine. You'll find that you have little more RAM if you never invoke the compiler after reboot anyway. :)