Best pins to use on ESP8266

  01. SmartHome

Best pins to use on ESP8266

Tooling Tuesday - Wemos D1 Mini & MicroPython
D1 mini pinout

Most board do not have made all pins available. The NodeMCU boards have almost all usable pins made available and some which need special attention.

GPIOInputOutputRemarks
5 (D1)OKOKOften used for I2C
4 (D2)OKOKOften used for I2C
14 (D5)OKOK 
12 (D6)OKOK 
13 (D7)OKOK 
0 (D3)pulled upOKBoot fail if pulled low
2 (D4)pulled upOKBoot fail if pulled low
15 (D8)pulled to GNDOKBoot fail if pulled high
16 (D0)High at boot, pull down to GNDno interruptno PWM / I2C supportUsed to wake up from deep sleep
9 (SD2)High at boot See notes
10 (SD3)High at boot See notes
3 (RX)High at bootis RXRX channel of serial0
1 (TX)is TXdebug output at bootBoot fail if pulled low

The labels used in the tabel above are the labels on NodeMCU boards.

Sources used:

Special notes on GPIO 6 – 11

Almost any ESP8266 board has a flash chip connected to some or all of GPIO6-GPIO11.

GPIO 9 & 10 can be used on ESP8285, since that chip has 1 MB flash embedded and is not using those pins. One or both of pins may sometimes also be available on ESP8266 boards, depending on the flash used and the flash operation mode.

  • Quad IO (QIO) uses 4 lines for data (6 pins total)
  • Dual IO (DIO) uses 2 lines for data (4 pins total)
  • Standard uses a single line for data (3 pins total)

It is best not to use any of the GPIO pins 6 – 11.

Special notes on GPIO 16

GPIO-16 is a special pin. The RTC will send a short (low) pulse when the sleep timer does send a wake-up signal.

In order to wake from deep sleep, GPIO-16 has to be connected to the RST pin. If connected, this pin should not be used as GPIO pin, or else the module will reboot.

Other limitations are:

  • GPIO16 has a built-in pull-down resistor (all others have built-in pull-up)
  • To enable the pull-down resistor for GPIO16, you have to use INPUT_PULLDOWN_16

LEAVE A COMMENT