Category Archives: nodeMCU

Cheap NodeMCU Boards

ESP8266 NodeMCUThis could be the shorted blog I’ve ever written! We’ve been talking about ESP8266 recently and as I was running out of boards, I sent off for some of these from AliExpress – my favourite store next to Ebay.  At a total cost of just over £3 they had to be worth a go.

So on the LEFT you see the reset button – on the right you see the FLASH button – this might indicate that normal Arduino-style programming doesn’t work… so I put it to test with a sample BLINK program.

When the board comes on – the normal blue light on the ESP12 flickers – nothing unexpected there.  I tried programming from the Arduino IDE – nothing - mind you I was expecting that. I pressed the reset and FLASH buttons together and let go of the RESET then the FLASH button – I started the programming – the blue light flashed – success.  As I was using the standard Arduino blink sketch, I tied my LED+RESISTOR to ground and GPIO13 and sure enough – the light flashed.

Just to be sure as these WERE cheap, I tried all three of them. No problems at all.

for the board itself – the lettering on the top is utterly messed up – someone wasn’t thinking when they did the screen print – however the lettering UNDERNEATH is just fine. The regulator used is one of the larger ones and so should handle a little extra 3v3 if this is needed for any peripheral boards. I’d not recommend driving the board from 12v however!  I did my testing powering the board from the microUSB connector. No problem. There IS another LED on the board but it didn’t do anything when programming – no doubt at some point I’ll be doing something and it will light up at which point I’ll update the blog.

And so there it is – next I have some WEMOS D1 Mini boards on the way from Ebay.


Lua Revisited

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:

- float:

- integer:

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.