ESP8266 NodeMCU pinout
Every ESP8266 NodeMCU pin with its capabilities (digital, PWM, ADC, I2C, SPI, UART) and the wiring gotchas that bite. The cheap WiFi board that made hobby IoT mainstream. 3.3 V logic (NOT 5 V tolerant), a single analog input, and several pins that must sit at the right level at boot. The silkscreen D-labels do NOT match the GPIO numbers you use in code.
ESP8266 @ 80/160 MHz, WiFi / 3.3 V Logic: 3.3 V Free in app
ESP8266 NodeMCU pinout diagram ESP8266 NodeMCU (ESP-12E) pinout diagram USB ESP8266 NodeMCU A0 = A0 (ADC0): Analog in. Watch out: 0-3.3 V on NodeMCU/Wemos (divider); 0-1.0 V on a bare ESP8266 A0 Analog in ⚠ RSV (not detailed in the catalog yet) RSV RSV (not detailed in the catalog yet) RSV SD3 = SD0-SD3/CLK/CMD (GPIO6-11): Reserved - flash. Watch out: Connected to the flash chip; do not use SD3 Reserved - flash ⚠ SD2 = SD0-SD3/CLK/CMD (GPIO6-11): Reserved - flash. Watch out: Connected to the flash chip; do not use SD2 Reserved - flash ⚠ SD1 = SD0-SD3/CLK/CMD (GPIO6-11): Reserved - flash. Watch out: Connected to the flash chip; do not use SD1 Reserved - flash ⚠ CMD = SD0-SD3/CLK/CMD (GPIO6-11): Reserved - flash. Watch out: Connected to the flash chip; do not use CMD Reserved - flash ⚠ SD0 = SD0-SD3/CLK/CMD (GPIO6-11): Reserved - flash. Watch out: Connected to the flash chip; do not use SD0 Reserved - flash ⚠ CLK = SD0-SD3/CLK/CMD (GPIO6-11): Reserved - flash. Watch out: Connected to the flash chip; do not use CLK Reserved - flash ⚠ GND: Ground GND Ground 3V3: Power out 3.3V 3V3 Power out 3.3V EN = EN (CH_PD): Enable. Watch out: Must be HIGH to run (pulled up) EN Enable ⚠ RST: Reset RST Reset GND: Ground GND Ground VIN = Vin / 5V: Power in 5V. Watch out: Feeds the onboard regulator; board logic is still 3.3 V VIN Power in 5V ⚠ D0 = D0 (GPIO16): Wake from deep-sleep. Watch out: No PWM / interrupt / I2C; no internal pull-up D0 Wake from deep-sleep ⚠ D1 = D1 (GPIO5): PWM · Interrupt · I2C SCL (default) D1 PWM · Interrupt · I2C SCL (default) D2 = D2 (GPIO4): PWM · Interrupt · I2C SDA (default) D2 PWM · Interrupt · I2C SDA (default) D3 = D3 (GPIO0): PWM · Interrupt. Watch out: Strapping: must be HIGH at boot (FLASH button); has pull-up D3 PWM · Interrupt ⚠ D4 = D4 (GPIO2): PWM · Interrupt · Built-in LED. Watch out: Strapping: must be HIGH at boot; onboard LED is active-LOW D4 PWM · Interrupt · Built-in LED ⚠ 3V3: Power out 3.3V 3V3 Power out 3.3V GND: Ground GND Ground D5 = D5 (GPIO14): PWM · Interrupt · SPI SCK D5 PWM · Interrupt · SPI SCK D6 = D6 (GPIO12): PWM · Interrupt · SPI MISO D6 PWM · Interrupt · SPI MISO D7 = D7 (GPIO13): PWM · Interrupt · SPI MOSI D7 PWM · Interrupt · SPI MOSI D8 = D8 (GPIO15): PWM · Interrupt · SPI CS. Watch out: Strapping: must be LOW at boot; has pull-down D8 PWM · Interrupt · SPI CS ⚠ RX = RX (GPIO3): UART RX. Watch out: Used by USB serial RX UART RX ⚠ TX = TX (GPIO1): UART TX. Watch out: Used by USB serial; must be HIGH at boot TX UART TX ⚠ GND: Ground GND Ground 3V3: Power out 3.3V 3V3 Power out 3.3V Power GND I2C SPI UART Analog PWM Digital Other / not in catalog yet ⚠ has a watch-out in the table below · hover a pin for details
Pin Capabilities Watch out A0 (ADC0) Analog in 0-3.3 V on NodeMCU/Wemos (divider); 0-1.0 V on a bare ESP8266
D0 (GPIO16) Digital Wake from deep-sleep No PWM / interrupt / I2C; no internal pull-up
D1 (GPIO5) Digital PWM Interrupt I2C SCL (default)
D2 (GPIO4) Digital PWM Interrupt I2C SDA (default)
D3 (GPIO0) Digital PWM Interrupt Strapping: must be HIGH at boot (FLASH button); has pull-up
D4 (GPIO2) Digital PWM Interrupt Built-in LED Strapping: must be HIGH at boot; onboard LED is active-LOW
D5 (GPIO14) Digital PWM Interrupt SPI SCK
D6 (GPIO12) Digital PWM Interrupt SPI MISO
D7 (GPIO13) Digital PWM Interrupt SPI MOSI
D8 (GPIO15) Digital PWM Interrupt SPI CS Strapping: must be LOW at boot; has pull-down
RX (GPIO3) Digital UART RX Used by USB serial
TX (GPIO1) Digital UART TX Used by USB serial; must be HIGH at boot
SD0-SD3/CLK/CMD (GPIO6-11) Reserved - flash Connected to the flash chip; do not use
3V3 Power out 3.3V
Vin / 5V Power in 5V Feeds the onboard regulator; board logic is still 3.3 V
EN (CH_PD) Enable Must be HIGH to run (pulled up)
RST Reset
GND Ground
ESP8266 NodeMCU gotchas & notes D-labels are NOT GPIO numbers: D1 = GPIO5, D2 = GPIO4, and so on. Always use the GPIO number in code. Boot/strapping pins: GPIO0 (D3) must be HIGH, GPIO2 (D4) must be HIGH, GPIO15 (D8) must be LOW at power-up, or the board won't boot. GPIO16 (D0) is special: no PWM, no interrupts, no I2C, no internal pull-up. Wire it to RST to wake from deep sleep. Only ONE analog pin (A0). On NodeMCU/Wemos it reads 0-3.3 V via an onboard divider; the bare ESP8266 ADC is 0-1.0 V. GPIO6-11 are wired to the flash chip - do NOT use them. PWM is software (any usable GPIO except D0); default I2C is SDA=D2 (GPIO4), SCL=D1 (GPIO5).
Get this pinout — plus 55+ sensor wiring diagrams, shield maps and maker calculators — offline on your phone.
Get it on Google Play
Other board pinouts