nodemcu pins

ESP8266 NodeMCU (Arduino compiler) Pins. Now with WeMos D1 Mini!

Here are two images I look up often when using ESP8266 boards.  I like the NodeMCU versions, they are cheap and easy to use with USB power or a battery.

The pins are not labeled in a friendly way for the arduino compiler, however.  The arduino compiler uses the GPIO numbers on the chip, while the board’s silkscreen uses NodeMCU labels.  Below is a nice image (from here) showing the pin numbers.

nodemcu pins

The pins, like on many microcontrollers, have multiple functions.  For example, even though you can wire external devices to GPIO1 and GPIO3, doing so could prevent the serial port from working, or cause serial print commands to drive your device!  A nice summary (from here) shows that there are only a few pins that truly have nothing to do.  The lines in green show that GPIO 4, 5, 12, 13, 14 are your safest bets.  The yellow lines can be used as outputs but can cause funny behavior if used as inputs because external signals are read on these pins at boot or other times.  I have made the mistake of hooking a GPS serial stream to GPIO 15 which caused intermittent problems; depending on the data coming in sometimes the pin was high or low which affected boot behavior.

pin functions

Here’s the WeMos D1 Mini too, also a nice choice for inexpensive boards.  These usually don’t have the pins soldered which is my preference. (image from here)

Leave a Reply

Your email address will not be published. Required fields are marked *