que-pines-puedo-usar-esp8266

Which pins can I use on an ESP8266

  • 4 min

In the previous post, we saw the different pins of the ESP8266 and their functionalities. But we already mentioned that not all pins are safe to use in our projects.

This is because some pins have specific functions or play a crucial role in the device’s boot process. If not used correctly, this can generate a conflict and cause our project not to boot, or even break something.

Out of the 17 GPIOs (0 to 16):

  • 6 GPIOs (GPIO6 to GPIO11) are used to connect via SPI to the flash memory, so we cannot use them.
  • The GPIO0, GPIO2, and GIPO15 are involved in the boot process, with the considerations we saw in the previous section.
  • The GPIO1 and GPIO3 are used for Serial (UART) communication.

Pin Summary

To avoid setbacks and ensure we use the pins appropriately, we have the following reference table. It allows us to check at a glance which pins are safe to use and which have specific functions we need to consider.

Before starting any project with the ESP8266, it is highly recommended to consult this reference table and familiarize yourself with the characteristics of each pin. This will allow us to make informed decisions and avoid potential issues in the development of our projects.

{ “columns”: [ { “key”: “gpio”, “header”: “GPIO”, “width”: “80px”, “class”: “gpio-num” }, { “key”: “name”, “header”: “Name”, “width”: “100px”, “class”: “pin-name” }, { “key”: “input”, “header”: “Input”, “width”: “1fr”, “type”: “text” }, { “key”: “output”, “header”: “Output”, “width”: “1fr”, “type”: “text” }, { “key”: “note”, “header”: “Notes”, “width”: “2fr”, “class”: “note-cell” } ], “filters”: [ { “label”: “All”, “value”: “ALL”, “active”: true }, { “label”: “Safe”, “value”: “safe” }, { “label”: “Caution”, “value”: “warn” }, { “label”: “Avoid”, “value”: “danger” }, { “label”: “I2C”, “value”: “I2C” }, { “label”: “SPI”, “value”: “SPI” } ], “data”: [ { “gpio”: 0, “name”: “D3”, “input”: [“⚠️Pulled Up”], “output”: [“✔️”], “note”: “Boot fails if pulled LOW. Connected to FLASH button.”, “status”: “warn” }, { “gpio”: 1, “name”: “TX”, “input”: [“⚠️TX”], “output”: [“✔️”], “note”: “HIGH during boot. Boot fails if pulled LOW. Debug output on boot. Not usable if UART is used.”, “status”: “danger” }, { “gpio”: 2, “name”: “D4”, “input”: [“⚠️Pulled Up”], “output”: [“✔️”], “note”: “HIGH during boot. Boot fails if pulled LOW. Built-in LED. TX1”, “status”: “warn” }, { “gpio”: 3, “name”: “RX”, “input”: [“✔️”], “output”: [“⚠️RX”], “note”: “HIGH during boot. Not usable if UART is used.”, “status”: “warn” }, { “gpio”: 4, “name”: “D2”, “input”: [“✔️”], “output”: [“✔️”], “note”: “SDA (I2C)”, “status”: “safe” }, { “gpio”: 5, “name”: “D1”, “input”: [“✔️”], “output”: [“✔️”], “note”: “SCL (I2C)”, “status”: “safe” }, { “gpio”: 6, “name”: ”-”, “input”: [”❌”], “output”: [”❌”], “note”: “Used by FLASH memory.”, “status”: “danger” }, { “gpio”: 7, “name”: ”-”, “input”: [”❌”], “output”: [”❌”], “note”: “Used by FLASH memory.”, “status”: “danger” }, { “gpio”: 8, “name”: ”-”, “input”: [”❌”], “output”: [”❌”], “note”: “Used by FLASH memory.”, “status”: “danger” }, { “gpio”: 9, “name”: ”-”, “input”: [”❌”], “output”: [”❌”], “note”: “Used by FLASH memory.”, “status”: “danger” }, { “gpio”: 10, “name”: ”-”, “input”: [”❌”], “output”: [”❌”], “note”: “Used by FLASH memory.”, “status”: “danger” }, { “gpio”: 11, “name”: ”-”, “input”: [”❌”], “output”: [”❌”], “note”: “Used by FLASH memory.”, “status”: “danger” }, { “gpio”: 12, “name”: “D6”, “input”: [“✔️”], “output”: [“✔️”], “note”: “MISO (SPI)”, “status”: “safe” }, { “gpio”: 13, “name”: “D7”, “input”: [“✔️”], “output”: [“✔️”], “note”: “MOSI (SPI)”, “status”: “safe” }, { “gpio”: 14, “name”: “D5”, “input”: [“✔️”], “output”: [“✔️”], “note”: “SCLK (SPI)”, “status”: “safe” }, { “gpio”: 15, “name”: “D8”, “input”: [“⚠️Pulled to GND”], “output”: [“✔️”], “note”: “CS (SPI). LOW during boot. Boot fails if pulled HIGH. No Pull-Up.”, “status”: “warn” }, { “gpio”: 16, “name”: “D0”, “input”: [“⚠️No INT”], “output”: [“⚠️No PWM”, “⚠️No I2C”], “note”: “HIGH during boot. Pull-Down resistor. Connect to RST for Wake-Up.”, “status”: “warn” }, { “gpio”: “ADC0”, “name”: “A0”, “input”: [“⚠️Analog Input”], “output”: [”❌”], “note”: “Analog Input only.”, “status”: “warn” } ] }

In upcoming posts, we will look at different development boards like the NodeMCU that integrate the ESP8266 and start its programming.