This article guides you about GPIOs pins what is the use of them and which suits your project most.

Before reading this article if you are beginner, I recommend to read previous article (Review about ESP8266).

In this article I am going to talk about ESP8266 pinout reference and the most widely use ESP8266 board which are:

 

  • ESP8266 12-E NodeMCU Kit
  • ESP8266-01
  • Wemos D1 Mini Pinout

 

Now carefully read this article and learn about GPIOs pins so that it does not confuse you further more.

ESP8266 12-E

You cannot use all GPIO pins in all type of ESP8266 development board the reason is that some of them are disclose, while some are not convenient.

Talking about ESP8266 12- E chip, it is a very powerful microcontroller on its own. It has 17 GPIOs pins

Following diagram help as reference if you have ESP8266 12-E

 

ESP8266

Personally, I really like this component. It has excellent performance with low cost. It is loaded with feature, the most important one is Wi-Fi. It comes with USB input and it has 17 GPIO pins. I will give you an overview of ESP8266 IC and its pinout. It has also onboard LED.

ESP8266 Peripherals

 

  • SPI (Serial Peripheral Interface) pins
  • 17 GPIO (General Purpose Input Output)
  • 12C pins (Inter-Integrated Circuit)
  • UART (universal Asynchronous Receiver Transmitter) interface
  • Voltage: 3.0V to 3.6V
  • 10-bit ADCO Analog to Digital Converter
  • 12S (Inter-IC Sound) interface

ESP8266 GPIOs Pin

 

First of all you need to know that , GPIOs number on the board dose not match the label on silk screen.  For example, D1 corresponding to GPIO5. I will prove you a brief table about ESP8266 pin and GPIOs and also which pin is best in use for a particular project.

 

Label GPIO Input Output Detail
A0 ADC0 Analog Input no Analog input from 0-3.3V with no output
RX GPIO3 yes RX pin High at boot
TX GPIO1  TX pins yes High at boot (boot fails when pulled low)
D0 GPIO16 No interrupt PWM/12C no support High at boot with used to wake up from deep sleep
D1 GPIO5 yes yes Often used as SCL (12C)
D2 GPIO4 yes yes Often used as SDA (12C)
D3 GPIO0 Pulled up yes Connected to Flash Button
D4 GPIO2 Pulled up yes Connected to on board LED
D5 GPIO14 yes yes SPI SCLK pin
D6 GPIO12 yes yes SPI MISO pin
D7 GPIO13 yes yes SPI MOSI pin
D8 GPIO15 Pulled to GND yes SPI CS pin

 

Flash chip

From GPIO6 to GPIO11, they all connected to flash chip. There I don’t recommend to use these pins.

SPI Pins

It contains following pins:

  • GPIO12
  • GPIO13
  • GPUI14
  • GPIO15

12C pins

We can use any two pins for 12C as ESP8266 does not provide hardware 12C pins. But following two are most common

  • GPIO 5
  • GPIO 4

PWM pins

ESP8266 signals have 10-bit resolution and it allows software PWM in all from GPIO0 to GPIO16 input /output pins.

LED On-Board

ESP8266 development board have one or more built on ESP8266 module LEDs connected to GPIO2 and other on development board connected to GPIO16.

Reset pin

Press the reset button makes RST pin low and reset the ESP8266 chip.

Flash Button

On board there is another button of Flash/Boot, by pressing the Flash button or pulling the GPIO0 to low turns ESP8266 chip into bootloader mode.

 

Wake up

On ESP8266 board GPIO16 is use to wake up the ESP8266 from deep sleep. And it should be connected to RST pin to wake up.

GPIO16

Except GPIO16 all the other support interrupts.

 

ESP8266 pin for Boot

The following pins output 3.3V signals therefore it causes some problem while booting when you connecting relays, peripheral or transistors. These devices can misbehave. These pins are high at boot.

  • GPIO16
  • GPIO3
  • GPIO9
  • GPIO1
  • GPIO10

So GPIO5 and GPIO4 are most reliable if you want to operate relays.

Pins pulled LOW /High

Some pins pulled low or high on booting so you should know about it

  • GPIO9 >>> pin high at Boot
  • GPIO1>>> pin high at Boot, boot failure if pulled LOW
  • GPIO15 >>> boot failure if pulled HIGH
  • GPIO0>>> boot failure if pulled LOW
  • GPIO10>>>pin high at Boot
  • GPIO3>>>pin high at Boot
  • GPIO2>>>pin high on Boot, Boot failure if pulled LOW

 Analog Input

ESP8266 supports analog reading and have only one 10-bit analog to digital converter (ADCO) and it label as A0. ADCO pin have maximum voltage is between 0 to 1V. when want to interface two sensors then it causes big disadvantage that you should use or to buy separate ADC modules. But this is a different topic.

ESP8266 12-E  NodeMCU kit Pinout

Following diagram help as reference if you have ESP8266 12-E NodeMCU kit pinout

ESP8266-01 Pinout

Following diagram help as reference if you have ESP8266-01 pinout

 

Wemos D1 Mini Pinout

 

Following diagram help as reference if you have Wemos D1 Mini.

 

I hope you like this article and it solve all your confusion related to ESP8266 pinout reference. Stay tuned with us for more projects on this website  projectiot123.com . Thank you!

esp8266 pinout programming for beginners