Opens in a new tab

NodeMCU ESP8266 Pinout

NodeMCU is the classic ESP8266 development board: an ESP-12E/F module, a USB-serial converter, a regulator and two buttons. It is still one of the cheapest ways to get Wi-Fi.

Two main versions are on the market – the narrower v2 (Amica, CP2102) and the wider v3 (LoLin, CH340). The pinout is the same; v3 just has GND and 5 V from USB (VU) in place of two reserved pins.

Specifications

  • ESP8266: Tensilica L106 80/160 MHz
  • 4 MB flash (ESP-12E/F module)
  • Wi-Fi 4 (2.4 GHz)
  • 11 GPIO on the headers (D0–D8, RX, TX), analog input A0 (0–3.2 V)
  • hardware SPI (HSPI) and UART, software I2C and PWM on any pin
  • micro USB, CP2102 (v2) or CH340 (v3) converter, FLASH and RST buttons
  • blue LED on GPIO2 (module) and on GPIO16 (board)

In the Arduino IDE select NodeMCU 1.0 (ESP-12E Module). The D0–D8 labels on the board don’t match the GPIO numbers – in code use the D1, D2… constants or the GPIO numbers from the table.

Pinout and pin table

Hover over a pin in the diagram or a table row; use the filter to highlight a bus. You can download the pinout as PNG or SVG.

Pin names:
NodeMCU v2 (ESP8266) – pinoutNodeMCU v2 (ESP8266) – pinoutchiptron.eu · CC BY 4.0micro USBFLASHRSTESP-12EESP8266 1 3V3 ← 3.3 V output from the regulator 2 GND 3 GPIO1 D10 TX 4 GPIO3 D9 RX 5 GPIO15 D8 SS 6 GPIO13 D7 MOSI 7 GPIO12 D6 MISO 8 GPIO14 D5 SCK 9 GND 10 3V3 ← 11 GPIO2 D4 blue LED 12 GPIO0 D3 FLASH button 13 GPIO4 D2 SDA 14 GPIO5 D1 SCL 15 GPIO16 D0 Onboard LED 30 VIN ← Power input 5 V (3.3 V regulator) 29 GND 28 RST ← Reset – connecting to GND restarts the chip 27 EN ← Chip enable – logic 0 turns the chip off 26 3V3 → 25 GND 24 GPIO6 CLK 23 GPIO7 SD0 22 GPIO11 CMD 21 GPIO8 SD1 20 GPIO9 SD2 19 GPIO10 SD3 18 RSV Reserved (v3: GND and VU = 5 V) 17 RSV 16 A0 GPIO Arduino / board UART I2C SPI ADC (analog) Power Ground (GND) Control / reset Not connected Strapping pin Used by flash
Download:PNGSVG
Pin table – NodeMCU v2 (ESP8266)
PinNameArduino / boardDirectionUARTI2CSPIADCNote
13V3output3.3 V output from the regulator
2GND–
3GPIO1D10input/outputTXUART0 TX – connected to the USB-serial converter
4GPIO3D9input/outputRXUART0 RX – connected to the USB-serial converter
5GPIO15D8input/outputSSStrapping pin – must be logic 0 at boot (pull-down on the board)
6GPIO13D7input/outputMOSI
7GPIO12D6input/outputMISO
8GPIO14D5input/outputSCK
9GND–
103V3output3.3 V output from the regulator
11GPIO2D4input/outputBlue LED on the module (lights at logic 0). Strapping pin – must be logic 1 at boot
12GPIO0D3input/outputFLASH button. Strapping pin – logic 0 at boot = download mode
13GPIO4D2input/outputSDA
14GPIO5D1input/outputSCL
15GPIO16D0input/outputOnboard LED (lights at logic 0). Wake from deep sleep (connect to RST); no interrupts or I2C (PWM works in Arduino)
16A0inputADC0Analog input 0–3.2 V (220k/100k divider on the board; the chip itself measures 0–1 V)
17RSV–Reserved (v3: GND and VU = 5 V)
18RSV–Reserved (v3: GND and VU = 5 V)
19GPIO10SD3input/outputFlash (SD3, WP) – usable only with flash in DIO mode
20GPIO9SD2input/outputFlash (SD2, HOLD) – practically unusable, even with flash in DIO mode
21GPIO8SD1input/outputConnected to flash memory (SD1) – do not use
22GPIO11CMDinput/outputConnected to flash memory (CMD) – do not use
23GPIO7SD0input/outputConnected to flash memory (SD0) – do not use
24GPIO6CLKinput/outputConnected to flash memory (CLK) – do not use
25GND–
263V3output3.3 V output from the regulator
27ENinputChip enable – logic 0 turns the chip off
28RSTinputReset – connecting to GND restarts the chip
29GND–
30VINinputPower input 5 V (3.3 V regulator)

What to watch out for

  • Logic is 3.3 V – use a level shifter for 5 V signals.
  • Strapping pins: D3 (GPIO0) and D4 (GPIO2) must be at logic 1 at boot and D8 (GPIO15) at logic 0 – otherwise the board won’t start.
  • A0 measures 0–3.2 V thanks to a 220 kΩ / 100 kΩ divider on the board (the chip itself measures only 0–1 V).
  • D0 (GPIO16) supports neither interrupts nor I2C (PWM works in Arduino) – it is used for waking from deep sleep (connect it to RST).
  • GPIO9 and GPIO10 (SD2, SD3) are connected to the flash – GPIO9 (HOLD) is practically unusable, GPIO10 only with the flash in DIO mode.

NodeMCU projects on chiptron.eu/

Projects and guides on chiptron.eu/:

More pinouts

See all pinouts on the Pinouts page.

Related Articles