Original ESP32 GPIO Reference

From diychristmas.org wiki
Jump to navigation Jump to search


Original ESP32 GPIO Reference

The Original ESP32 provides a large number of General Purpose Input/Output (GPIO) pins that may be configured for digital input, digital output, analog input, PWM, serial communication, and many other functions.

Although many GPIO pins are available, not every pin is suitable for every application. Some are reserved for flash memory, some affect the processor boot process, and others may already be connected to hardware on a particular development board.

This page summarizes the GPIO capabilities of the Original ESP32 family commonly used in DIY holiday lighting projects.


Figure 1 – Typical Original ESP32 GPIO assignments.

GPIO Summary

GPIO Input Output Notes
0 Yes Yes Boot (strapping) pin
1 Yes Yes UART0 TX
2 Yes Yes Boot pin on some boards
3 Yes Yes UART0 RX
4 Yes Yes General-purpose GPIO
5 Yes Yes General-purpose GPIO
6-11 No No Connected to onboard SPI Flash
12 Yes Yes Strapping pin
13 Yes Yes General-purpose GPIO
14 Yes Yes General-purpose GPIO
15 Yes Yes Strapping pin
16 Yes Yes General-purpose GPIO
17 Yes Yes General-purpose GPIO
18 Yes Yes General-purpose GPIO
19 Yes Yes General-purpose GPIO
21 Yes Yes General-purpose GPIO
22 Yes Yes General-purpose GPIO
23 Yes Yes General-purpose GPIO
25 Yes Yes DAC capable
26 Yes Yes DAC capable
27 Yes Yes General-purpose GPIO
32 Yes Yes ADC capable
33 Yes Yes ADC capable
34 Yes No Input only
35 Yes No Input only
36 Yes No Input only
39 Yes No Input only

GPIO Categories

Recommended for Pixel Outputs

The following GPIO pins are commonly used for pixel outputs.

  • GPIO 4
  • GPIO 5
  • GPIO 13
  • GPIO 14
  • GPIO 16
  • GPIO 17
  • GPIO 18
  • GPIO 19
  • GPIO 21
  • GPIO 22
  • GPIO 23
  • GPIO 25
  • GPIO 26
  • GPIO 27
  • GPIO 32
  • GPIO 33

Boot (Strapping) Pins

The following GPIO pins affect processor startup and should be used with caution.

  • GPIO 0
  • GPIO 2
  • GPIO 5
  • GPIO 12
  • GPIO 15

These pins are sampled during reset to determine boot configuration.

Input Only Pins

The following GPIO pins cannot be used as outputs.

  • GPIO 34
  • GPIO 35
  • GPIO 36
  • GPIO 39

Reserved Pins

GPIO 6 through GPIO 11 are connected internally to the SPI Flash memory and should never be used for external connections.

Practical Notes

Most ESP32 development boards expose only a subset of the available GPIO pins.

In addition, many boards permanently connect certain GPIO pins to onboard hardware such as:

  • USB interfaces
  • Status LEDs
  • Boot and reset buttons
  • Ethernet controllers
  • OLED displays
  • Battery monitors
  • PSRAM
  • Flash memory

Always consult the schematic or documentation for the specific development board before assigning GPIO pins.

Community Verified GPIO

The following information has been verified through testing by members of the DIY holiday lighting community. These results represent real-world testing and may differ from the processor datasheet depending on the development board, firmware, and firmware version.

Development Board Processor Firmware Version Verified Pixel Outputs Verified By Notes
ESP-WROOM-32S (30-pin) Original ESP32 WLED 0.16 GPIO 4, 5, 12, 13, 18, 19, 20, 21, 22, 23, 25, 27, RX0, TX0 Ernie Horning Tested using WLED pixel output configuration.

Additional community testing is encouraged.

GPIO Not Yet Verified

GPIO Board Firmware Status
GPIO 26 ESP-WROOM-32S WLED 0.16 GPIO 26 was not functional during testing with the ESP-WROOM-32S running WLED 0.16. Additional testing is needed to determine whether this is a

board-specific or firmware-specific limitation.

Firmware Considerations

Firmware may impose additional GPIO restrictions beyond those defined by the processor or development board.

Some firmware may:

  • Reserve GPIO pins for internal functions.
  • Restrict available pixel outputs.
  • Support only selected GPIO pins.
  • Change GPIO availability between firmware versions.

Always consult the firmware documentation for the version being used.

See:

See Also