ESP8266 Pinout
ESP8266 (ESP-12E / NodeMCU) · ESP-12E module / NodeMCU dev board
The ESP8266 exposes eleven usable GPIO. Several carry boot-strapping duties, so which pins are safe to use is the thing most people are actually looking up.
| Pin | Name | Function |
|---|---|---|
| D0 | GPIO16 | Wake from deep sleep. No interrupt, no PWM. |
| D1 | GPIO5 | Safe. Commonly I²C SCL. |
| D2 | GPIO4 | Safe. Commonly I²C SDA. |
| D3 | GPIO0 | Boot-strap: must be HIGH at boot, LOW enters flash mode. |
| D4 | GPIO2 | Boot-strap: must be HIGH at boot. On-board LED. |
| D5 | GPIO14 | Safe. SPI SCLK. |
| D6 | GPIO12 | Safe. SPI MISO. |
| D7 | GPIO13 | Safe. SPI MOSI. |
| D8 | GPIO15 | Boot-strap: must be LOW at boot. SPI CS. |
| RX | GPIO3 | UART receive — occupied while flashing. |
| TX | GPIO1 | UART transmit — occupied while flashing. |
| A0 | ADC0 | Single 10-bit ADC, 0–1.0 V on the bare module. |
Things that catch people out
- Safe general-purpose pins: D1, D2, D5, D6, D7.
- GPIO0, GPIO2 and GPIO15 decide boot mode. A pull-down on GPIO0 stops the chip booting.
- NodeMCU boards divide A0 to 0–3.3 V; the bare ESP-12E does not.
Need this part on a board? PCBEditor generates the schematic and PCB from a prompt.
Open the editor →