February 21, 2017

The ESP8266 - working with a NodeMCU module

To my way of thinking this is the absolute best way to get started with an ESP8266. Sparkfun makes a great board or two, but this is far cheaper (sorry guys ...).

Just to be clear, I do not recommend NodeMCU or Lua. I build my own app using the SDK and without a moments hesitation flash that right over the top of NodeMCU.

You can find these cheap (or, er .. inexpensively) on AliExpress, which is where I always get them from. Expect to wait at least 2 weeks (that is the nature of free shipping from China). You might as well buy 10 of them if you are going to wait that long.

The advantage of using one of these are that you can plug it into a breadboard (or not), connect a USB cable and be good to go. It has an on-board USB to serial chip, 3.3 volt regulator, various handy buttons and lights. And all for about $3.00. How can you go wrong?

The only time these are unsuitable is when you want to build something to run from 3.3 volts using a battery. In that case you go to an ESP-12E module or something similar, but that would not be the way to start.

Pin numbers

Apparently the NodeMCU developers were smoking crack when they designed this thing. They invented a whole bunch of pin numbers that make no sense at all. You need to know how to translate these to plain old GPIO numbers. Here is how:

LED's

You get the little blue LED on the embedded ESP-12 board, which is connected to GPIO-2. But on the NodeMCU board itself, you also get a bright red LED (indicated as blue on the schematic). It is connected to GPIO-16 (the oddball gpio that is really the RTC).

Pinout