ESP8266 Pinout Reference_ Which GPIO Pins Should You Use
ESP8266 Pinout Reference_ Which GPIO Pins Should You Use
Menu
ESP8266 12-E Chip Pinout
The following figure illustrates the ESP8266 12-E chip pinout. Use
this diagram if you’re using an ESP8266 bare chip in your projects.
• The ESP8266 12-E chip comes with 17 GPIO pins.
Menu
ESP8266 12-E NodeMCU Kit
Menu
ESP8266 Peripherals
The ESP8266 peripherals include:
17 GPIOs
SPI
I2C (implemented on software)
I2S interfaces with DMA
UART
10-bit ADC
Menu
Best Pins to Use – ESP8266
On important thing to notice about ESP8266 is that the GPIO number doesn’t match the label on the
board silkscreen. For example, D0 corresponds to GPIO16 and D1 corresponds to GPIO5.
The following table shows the correspondence between the labels on the silkscreen and the GPIO number
as well as what pins are the best to use in your projects, and which ones you need to be cautious.
The pins highlighted in green are OK to use. The ones highlighted in yellow are OK to use, but you need to
pay attention because they may have unexpected behavior mainly at boot. The pins highlighted in red are
not recommended to use as inputs or outputs.
HIGH at boot
TX GPIO1 TX pin OK
debug output at boot, boot fails if pulled LOW
Analo
A0 ADC0 X
g
Input
Menu
The ESP8266 can be prevented from booting if some pins are pulled LOW or HIGH. The following list shows the
state of the following pins on BOOT:
GPIO16: pin is high atBOOT GPIO0: boot
failure if pulled LOW
GPIO2: pin is high on BOOT, boot failure if pulled LOW GPIO15:
boot failure if pulled HIGH
GPIO3: pin is high at BOOT
GPIO1: pin is high at BOOT, boot failure if pulled LOW GPIO10: pin
is high at BOOT
GPIO9: pin is high at BOOT
GPIO0
When GPIO0 is pulled LOW, it sets the ESP8266 into bootloader
mode. This is the same as pressing the on- board FLASH/BOOT
button.
GPIO16
GPIO16 can be used to wake up the ESP8266 from deep sleep. To
wake up the ESP8266 from deep sleep, GPIO16 should be
connected to the RST pin.
I2C
The ESP8266 doens’t have hardware I2C pins, but it can be
implemented in software. So you can use any
GPIOs as I2C. Usually, the following GPIOs are used as I2C pins:
GPIO5: SCL
GPIO4: SDA
Menu
SPI
The pins used as SPI in the ESP8266 are:
GPIO12: MISO
GPIO13: MOSI
GPIO14: SCLK
GPIO15: CS
PWM Pins
ESP8266 allows software PWM in all I/O pins: GPIO0 to GPIO16. PWM
signals on ESP8266 have 10-bit resolution.
Interrupt Pins
The ESP8266 supports interrupts in any GPIO, except GPIO16.
Menu