Nodemcu pinout

Nodemcu pinout is having labels D0 to D8 and RX-TX but when programming it using Arduino IDE we observe that its labels are not matching with IO connections. Lets see actual connections of NodeMCU with ESP8266 i.e. ESP-12.

NodeMCU is an open source IoT platform. It includes firmware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module. The term “NodeMCU” by default refers to the firmware rather than the dev kits.

We get two on board LEDs one is connected to GPIO2 and another is to GPIO16

Node MCU Pinout

nodemcu pins
NodeMCU Pinout

NodeMCU Pin Defining

NodeMCU has weird pin mapping.
Pin numbers written on the board itself do not correspond to ESP8266 GPIO pin numbers. We have constants defined to make using this board easier:

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

static const uint8_t SDA = PIN_WIRE_SDA;
static const uint8_t SCL = PIN_WIRE_SCL;

static const uint8_t LED_BUILTIN = 16;
static const uint8_t BUILTIN_LED = 16;

static const uint8_t D0   = 16;
static const uint8_t D1   = 5;
static const uint8_t D2   = 4;
static const uint8_t D3   = 0;
static const uint8_t D4   = 2;
static const uint8_t D5   = 14;
static const uint8_t D6   = 12;
static const uint8_t D7   = 13;
static const uint8_t D8   = 15;
static const uint8_t D9   = 3;
static const uint8_t D10 = 1;

NodeMCU Circuit Diagram

nodemcu circuit diagram
NodeMCU Circuit Diagram

Circuit diagram of NodeMCU makes more clear about connections of NodeMCU with ESP8266 GPIO. Never use GPIO0 (D3) as input pin, this pin is flash button. If it is low at power on state this will put ESP in programming mode.

 

Leave a Reply