que-pines-puedo-usar-esp32

Which pins can I use on an ESP32

  • 4 min

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

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

This is because some pins play specific roles or are involved 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 us with clear and precise information about which pins are safe to use and which have specific functions.

I advise you to keep this table handy and consult it before starting a project with an ESP32, to avoid surprises from having used a pin you shouldn’t have.

[ { “gpio”: 0, “name”: “IO0”, “funcs”: [“GPIO0”, “ADC2_CH1”, “TOUCH_CH1”, “PWM”], “tags”: [“Boot”, “PullUp”], “note”: “⚠️ HIGH at boot. LOW for flashing.”, “status”: “warn” }, { “gpio”: 1, “name”: “TX”, “funcs”: [“GPIO1”, “U0TXD”], “tags”: [“Debug”], “note”: ”❌ TX pin. Debug output at boot.”, “status”: “danger” }, { “gpio”: 2, “name”: “IO2”, “funcs”: [“GPIO2”, “ADC2_CH2”, “TOUCH_CH2”], “tags”: [“LED”, “Boot”], “note”: “⚠️ Floating/LOW for flashing. Connected to LED.”, “status”: “warn” }, { “gpio”: 3, “name”: “RX”, “funcs”: [“GPIO3”, “U0RXD”], “tags”: [“Debug”], “note”: ”❌ RX pin. HIGH at boot.”, “status”: “danger” }, { “gpio”: 4, “name”: “IO4”, “funcs”: [“GPIO4”, “ADC2_CH0”, “TOUCH_CH0”], “tags”: [], “note”: “✔️ Safe for general use.”, “status”: “safe” }, { “gpio”: 5, “name”: “IO5”, “funcs”: [“GPIO5”, “PWM”], “tags”: [“Boot”], “note”: “⚠️ Must be HIGH at boot.”, “status”: “warn” }, { “gpio”: 6, “name”: “CLK”, “funcs”: [“GPIO6”, “SPI_CLK”], “tags”: [“Flash”], “note”: ”❌ Reserved for SPI Flash.”, “status”: “danger” }, { “gpio”: 7, “name”: “D0”, “funcs”: [“GPIO7”, “SPI_Q”], “tags”: [“Flash”], “note”: ”❌ Reserved for SPI Flash.”, “status”: “danger” }, { “gpio”: 8, “name”: “D1”, “funcs”: [“GPIO8”, “SPI_D”], “tags”: [“Flash”], “note”: ”❌ Reserved for SPI Flash.”, “status”: “danger” }, { “gpio”: 9, “name”: “D2”, “funcs”: [“GPIO9”, “SPI_HD”], “tags”: [“Flash”], “note”: ”❌ Reserved for SPI Flash.”, “status”: “danger” }, { “gpio”: 10, “name”: “D3”, “funcs”: [“GPIO10”, “SPI_WP”], “tags”: [“Flash”], “note”: ”❌ Reserved for SPI Flash.”, “status”: “danger” }, { “gpio”: 11, “name”: “CMD”, “funcs”: [“GPIO11”, “SPI_CS0”], “tags”: [“Flash”], “note”: ”❌ Reserved for SPI Flash.”, “status”: “danger” }, { “gpio”: 12, “name”: “IO12”, “funcs”: [“GPIO12”, “ADC2_CH5”, “TOUCH_CH5”, “MTDI”], “tags”: [“Boot”, “JTAG”], “note”: “⚠️ Must be LOW at boot (LDO voltage).”, “status”: “warn” }, { “gpio”: 13, “name”: “IO13”, “funcs”: [“GPIO13”, “ADC2_CH4”, “TOUCH_CH4”, “MTCK”], “tags”: [“JTAG”], “note”: “✔️ JTAG Debug.”, “status”: “safe” }, { “gpio”: 14, “name”: “IO14”, “funcs”: [“GPIO14”, “ADC2_CH6”, “TOUCH_CH6”, “MTMS”, “PWM”], “tags”: [“JTAG”], “note”: “⚠️ PWM at boot.”, “status”: “warn” }, { “gpio”: 15, “name”: “IO15”, “funcs”: [“GPIO15”, “ADC2_CH3”, “TOUCH_CH3”, “MTDO”], “tags”: [“Boot”, “JTAG”], “note”: “⚠️ Must be HIGH at boot.”, “status”: “warn” }, { “gpio”: 16, “name”: “IO16”, “funcs”: [“GPIO16”], “tags”: [], “note”: “✔️ Safe for general use.”, “status”: “safe” }, { “gpio”: 17, “name”: “IO17”, “funcs”: [“GPIO17”], “tags”: [], “note”: “✔️ Safe for general use.”, “status”: “safe” }, { “gpio”: 18, “name”: “IO18”, “funcs”: [“GPIO18”], “tags”: [], “note”: “✔️ Safe for general use.”, “status”: “safe” }, { “gpio”: 19, “name”: “IO19”, “funcs”: [“GPIO19”], “tags”: [], “note”: “✔️ Safe for general use.”, “status”: “safe” }, { “gpio”: 21, “name”: “IO21”, “funcs”: [“GPIO21”, “I2C_SDA”], “tags”: [“I2C”], “note”: “✔️ Standard I2C SDA.”, “status”: “safe” }, { “gpio”: 22, “name”: “IO22”, “funcs”: [“GPIO22”, “I2C_SCL”], “tags”: [“I2C”], “note”: “✔️ Standard I2C SCL.”, “status”: “safe” }, { “gpio”: 23, “name”: “IO23”, “funcs”: [“GPIO23”], “tags”: [], “note”: “✔️ Safe for general use.”, “status”: “safe” }, { “gpio”: 25, “name”: “IO25”, “funcs”: [“GPIO25”, “ADC1_CH8”, “DAC_1”], “tags”: [“DAC”], “note”: “✔️ Safe. DAC output.”, “status”: “safe” }, { “gpio”: 26, “name”: “IO26”, “funcs”: [“GPIO26”, “ADC2_CH9”, “DAC_2”], “tags”: [“DAC”], “note”: “✔️ Safe. DAC output.”, “status”: “safe” }, { “gpio”: 27, “name”: “IO27”, “funcs”: [“GPIO27”, “ADC2_CH7”, “TOUCH_CH7”], “tags”: [], “note”: “✔️ Safe for general use.”, “status”: “safe” }, { “gpio”: 32, “name”: “IO32”, “funcs”: [“GPIO32”, “ADC1_CH4”, “TOUCH_CH9”], “tags”: [], “note”: “✔️ Safe for general use.”, “status”: “safe” }, { “gpio”: 33, “name”: “IO33”, “funcs”: [“GPIO33”, “ADC1_CH5”, “TOUCH_CH8”], “tags”: [], “note”: “✔️ Safe for general use.”, “status”: “safe” }, { “gpio”: 34, “name”: “IO34”, “funcs”: [“GPIO34”, “ADC1_CH6”], “tags”: [“InputOnly”], “note”: “⚠️ Input Only.”, “status”: “warn” }, { “gpio”: 35, “name”: “IO35”, “funcs”: [“GPIO35”, “ADC1_CH7”], “tags”: [“InputOnly”], “note”: “⚠️ Input Only.”, “status”: “warn” }, { “gpio”: 36, “name”: “VP”, “funcs”: [“GPIO36”, “ADC1_CH0”], “tags”: [“InputOnly”], “note”: “⚠️ Input Only.”, “status”: “warn” }, { “gpio”: 39, “name”: “VN”, “funcs”: [“GPIO39”, “ADC1_CH3”], “tags”: [“InputOnly”], “note”: “⚠️ Input Only.”, “status”: “warn” } ]