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?
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:
- Node D0 = GPIO 16 (the weird one)
- Node D1 = GPIO 5
- Node D2 = GPIO 4
- Node D3 = GPIO 0
- Node D4 = GPIO 2
- Node D5 = GPIO 14
- Node D6 = GPIO 12
- Node D7 = GPIO 13
- Node D8 = GPIO 15
- Node D9 = GPIO 3 (also Rx0)
- Node D10 = GPIO 1 (also Tx0)
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).