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 advantages 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?

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