I like to revisit things I’ve looked at in the past just to see if anything has changed. And so it was that I went off to the NODEMCU site to take a look at how it is coming on. NodeMCU is software for the ESP8266 which runs an interpreted language called LUA. As we know, interpreted languages are a lot safer and less crash prone than compiled languages…. right?
There is a great tool now that lets you pick which modules you are interested in. I selected what I would think would be the most useful one, ignoring chips I’d never heard off and therefore would not be able to test tonight.
Your NodeMCU custom build finished successfully. You may now download the firmware:
This was built against the master branch and includes the following modules: adc, bmp085, cjson, dht, enduser_setup, file, gpio, http, i2c, mdns, mqtt, net, node, ow, pwm, sntp, spi, tmr, uart, wifi, ws2812.
The files are guaranteed to be available for download for 24h.
I think that is very neat. Sadly, assumptions have been made. No-where could I find how you were supposed to get this BIN file onto the ESP. Thankfully I already knew the answer and a quick search of the web showed that the code should be located at ZERO. I grabbed the nodemcu programmer and fitted out one of my newly refurbished ESP-01 modules – just because it was on the desk.
Success. The module powered up immediately. Off I went for some examples – and of course the most basic example of all is that of the flashing light. I grabbed the example code.
if lighton==0 then
— 512/1024, 50% duty cycle
Can’t get any simpler, can it? The result:
> PANIC: unprotected error in call to Lua API (stdin:4: attempt to call global ‘led’ (a nil value))
Ok, For now, I’ll stick with my C code – and look in again in a few months. This kind of thing is why I abandoned NodeMCU in the first place. A simple “sorry you need this module” would have sufficed.