Language: EN

que-pines-puedo-usar-esp32

Which pins can I use on an ESP32

In the previous entry, we looked in detail at the different pins of the ESP32, as well as their specific functions and utilities.

However, just like with the ESP8266, not all pins of the ESP32 are equally safe to use in our projects.

This is because some pins perform specific roles or participate in the device’s boot process. Incorrectly using these pins can cause conflicts that prevent your project from working, or even break something.

Pin Summary

Therefore, it is very useful to have a reference table that provides clear and precise information about which pins are safe for use and which have specific functions.

I recommend keeping this table handy and consulting it before starting a project with an ESP32, to avoid surprises from using a pin that we shouldn’t.

GPIONAMEFUNCTIONSYOU CAN USE IT
0IO0GPIO0, ADC2_CH1, TOUCH_CH1, Boot⚠️Pulled-UP. Must be HIGH at boot.
Must be LOW for flashing.
Generates PWM on boot
1TXGPIO1, U0TXD❌TX Pin. Debug output on boot
2IO2GPIO2, ADC2_CH2, TOUCH_CH2⚠️Must be floating or LOW for flashing.
Connected to the LED
3RXGPIO3, U0RXD❌RX Pin. HIGH at boot
4IO4GPIO4, ADC2_CH0, TOUCH_CH0✔️
5IO5GPIO5⚠️Must be HIGH at boot.
Generates PWM signal on boot
6CLKGPIO6❌FLASH SPI
7D0GPIO7❌FLASH SPI
8D1GPIO8❌FLASH SPI
9D2GPIO9❌FLASH SPI
10D3GPIO10❌FLASH SPI
11CMDGPIO11❌FLASH SPI
12IO12GPIO12, ADC2_CH5, TOUCH_CH5, MTDI⚠️Must be LOW at boot
Debug JTAG
13IO13GPIO13, ADC2_CH4, TOUCH_CH4, MTCK🟢Debug JTAG
14IO14GPIO14, ADC2_CH6, TOUCH_CH6, MTMS⚠️Generates PWM signal on boot
Debug JTAG
15IO15GPIO15, ADC2_CH3, TOUCH_CH3, MTDO⚠️Must be HIGH at boot
Debug JTAG
16IO16GPIO16✔️
17IO17GPIO17✔️
18IO18GPIO18✔️
19IO19GPIO19✔️
21IO21GPIO21✔️
22IO22GPIO22✔️
23IO23GPIO23✔️
25IO25GPIO25, ADC1_CH8, DAC_1✔️
26IO26GPIO26, ADC2_CH9, DAC_2✔️
27IO27GPIO27, ADC2_CH7, TOUCH_CH7✔️
32IO32GPIO32, ADC1_CH4, TOUCH_CH9, XTAL_32K_P✔️
33IO33GPIO33, ADC1_CH5, TOUCH_CH8, XTAL_32K_N✔️
34IO34GPIO34, ADC1_CH6, VDET_1⚠️Input only
35IO35GPIO35, ADC1_CH7, VDET_2⚠️Input only
36VPGPIO36, ADC1_CH0, S_VP⚠️Input only
37VPGPIO37⚠️Input only
38VPGPIO38⚠️Input only
39VNGPIO39, ADC1_CH3, S_VN⚠️Input only
ENENCHIP_PU, Reset