All pinouts

Espressif ESP8266

ESP8266 NodeMCU Pinout

The NodeMCU ESP8266 is the board that put Wi-Fi in every maker project. It exposes 11 usable GPIOs labeled D0–D10 on the silkscreen, but the underlying chip uses different GPIO numbers — a mismatch that catches almost every beginner. The mapping below is the one you need.

Specifications

MCU
ESP8266EX (Tensilica L106, 80 MHz, overclockable to 160)
Flash
4 MB
SRAM
80 KB
GPIO
11 usable
ADC
1 channel, 10-bit (0–1.0V)
Operating voltage
3.3V (VIN accepts 5V)

Pin reference

PinNameType / functionsNotes
D0GPIO16Digital I/O, wake from deep sleepNo interrupt, no PWM, no I2C.
D1GPIO5 / SCLDigital I/O, default I2C SCL
D2GPIO4 / SDADigital I/O, default I2C SDA
D3GPIO0 / FLASHDigital I/OMust be HIGH at boot.
D4GPIO2 / TX1 / LEDDigital I/O, onboard LED (active LOW)Must be HIGH at boot.
D5GPIO14 / SCKDigital I/O, HSPI CLK
D6GPIO12 / MISODigital I/O, HSPI MISO
D7GPIO13 / MOSIDigital I/O, HSPI MOSI
D8GPIO15 / CSDigital I/O, HSPI CSMust be LOW at boot.
D9 / RXGPIO3 / RX0UART0 RX
D10 / TXGPIO1 / TX0UART0 TX
A0ADC0Analog input, 0–1.0V (board divider extends to 3.3V)
VIN5V inputPower
3V33.3V outputPower, ~600 mA
GNDGroundPower

Gotchas

  • 01Pin labels D0–D10 do NOT match the GPIO numbers. Use digitalWrite(D5, ...) or the literal GPIO number, never assume D5 == 5.
  • 02GPIO 0, 2, 15 are strapping pins. Wrong levels at boot prevent startup.
  • 03Only A0 reads analog, and the raw chip reads 0–1.0V. Most NodeMCU boards include a divider so 0–3.3V works on the header.
  • 04ESP8266 cannot use analogWrite() on D0 (GPIO16).

Explain code for this board

Paste a sketch and get a plain-English breakdown.

Open code explainer

Generate a wiring diagram

Describe your circuit and get a Mermaid diagram you can share.

Open diagram generator

Other boards