ESP32 Pinout
The values below are a common example for an ESP32 DevKit with a 16-channel relay board. Always verify against your firmware sketch.
GPIO for relays (example)
| Relay | GPIO |
|---|---|
| 1 | GPIO 32 |
| 2 | GPIO 33 |
| 3 | GPIO 25 |
| 4 | GPIO 26 |
| 5 | GPIO 27 |
| 6 | GPIO 14 |
| 7 | GPIO 12 |
| 8 | GPIO 13 |
| 9 | GPIO 23 |
| 10 | GPIO 22 |
| 11 | GPIO 21 |
| 12 | GPIO 19 |
| 13 | GPIO 18 |
| 14 | GPIO 5 |
| 15 | GPIO 4 |
| 16 | GPIO 2 |
Safety notes
- Do not use GPIO 6–11 (connected to internal flash).
- GPIO 2 may be HIGH at boot — test before relying on it for critical loads.
- Use optocoupler-isolated relay boards to separate low-voltage logic from mains.
UART for flashing
| ESP32 | USB-TTL |
|---|---|
| TX | RX |
| RX | TX |
| GND | GND |
| 3.3V | 3.3V (optional) |
Hold BOOT while starting a flash if the tool fails to connect.