ESP8266 NodeMCU pinout for Arduino IDE

 

ESP8266 NodeMCU pinout for Arduino IDE


NodeMCU pinout

For practical purposes ESP8266 NodeMCU V2 and V3 boards present identical pinouts. For our mechatronics projects we are mainly interested in the following pins:

  • Power pins (3.3 V).
  • Ground pins (GND).
  • Analog pins (A0).
  • Digital pins (D0 – D8, SD2, SD3, RX and TX – GPIO XX)

Most ESP8266 NodeMCU boards have one input voltage pin (Vin), three power pins (3.3v), four ground pins (GND), one analog pin (A0) and several digital pins (GPIO XX).


ESP8266 NodeMCU schematic

ESP8266 pinout, nodumcu pinout, node mcu pinout
NodeMCU ESP8266 pinout

These are affiliate links. This means if you click on the links and purchase the promoted item, we will receive a small affiliate commission at no extra cost to you, the price of the product is the same. We would really appreciate your support to our work and website if this is fine for you.

If we want to interact with a digital pin in Arduino IDE we have to remember the GPIO number (0..16), whereas for the analog pin the alias is used (A0). Digital pins can be used as inputs or outputs, however the analog pin can only be used as an input.

PinCodeArduino aliasPinCodeArduino alias
A0A0A0D6GPIO 1212
D0GPIO 1616D7GPIO 1313
D1GPIO 55D8GPIO 1515
D2GPIO 44SD2GPIO 99
D3GPIO 00SD3GPIO 1010
D4GPIO 22RXGPIO 33
D5GPIO 1414TXGPIO 11

For example, the following code initializes the GPIO 4 and 5 digital pins as input and output, respectively and the analog pin (A0) as input.

pinMode(4,INPUT)
pinMode(5,OUTPUT)
pinMode(A0,INPUT)

No comments:

Post a Comment