I hope Adafruit will update several things accordingly.
First, please consider shipping the Huzzah ESP 8266's with a current build because the LUA 0.9.5 build 20150318 shipped is considered ancient, buggy, and is missing a lot of things unwitting users won't know are missing.
I understand reflashing the devices creates an extra labor step, but considering the aggravation it will save others, I think it is well worth it. Many of the problems I and others have written about on the forums here simply go away when the latest NodeMCU firmware is flashed.
Granted, the Huzzah ESP8266 learn page does say :
Each HUZZAH ESP8266 breakout comes pre-programmed with NodeMCU's Lua interpreter. As of this writing, we ship with NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4 but it may be more recent [sic]
But if you all decide it's too much of a hassle to upgrade it before shipping, the above should read, at the very least: "powered by Lua 5.1.4, but there are more recent versions that may solve many problems you might encounter at the early stages."
These problems, some of which have been documented here, but latest firmware solves, include:
- tmr.delay's below 100000 microseconds in a tight loop cause resets every c.a. 1.5 seconds.
The tmr.delay() is used in at least two of the learn page's examples. It is natural hacking instinct to take that code, and just tweak the timer shorter, as I and at least one other person here did. As soon as you do that, the device starts resetting. The next natural instinct of both a newbie and an experience developer is to assume Adafruit's provided a reasonably working platform, so: "the problem must be my code." And we go hunt down the documentation. Here's where the timer problems get more squirrely and we go down the rabbit hole. Some of the basic timer functions are not implemented in that ancient LUA version, but the docs do not present that info without a lot of digging (which a newbie won't know how to do).
Also, please note that the tmr.delay() is frowned on by the NodeMcu dev's - they are strongly pushing for its deprecation, suggesting the use of tmr.alarm() and callbacks, but if you don't (know to) upflash, then:
- tmr.create() is nil (undefined)
Unfortunately, tmr.create() is what you'd use for almost all basic timer functions found in the docs - but it's undefined in the old LUA version.
I don't think it should be a concern that having to show how to flash a .bin into the device might be more documentation work than you want, because, as you know, it's actually pretty easy. Especially since they've set up a cool "cloud build" https://nodemcu-build.com/index.php and the NodeMCU Programmer or the PYProgrammer are simple.
I do realize of course, that the Arduino IDE approach is better for many people, but the LUA platform, when it is set up correctly, is actually very convenient for initial testing and prototyping. - not to mention the bazillion useful examples out there now using LUA.
thanks for your time (and maybe tmr.create() too? :)
- Howard