The ESP32-S2 is a single-core, 240 MHz microcontroller with native USB and 43 programmable GPIOs. Unlike the original dual-core ESP32, the S2 drops Bluetooth and ADC2 but adds dedicated capacitive touch sensors on nearly every pin and native USB OTG support. If you are holding an ESP32-S2-Saola-1 (the most common baseline dev board), the default I2C SDA is GPIO8 and SCL is GPIO9. Below is the exact mapping you need to wire your next project without frying the silicon or fighting the bootloader.
The ESP32-S2 Pinout Reference Table (Saola-1 Baseline)
How to read this table: ⚡ denotes a strapping pin (affects boot mode if pulled high/low at reset). 🔌 denotes native USB pins. 🖱️ denotes capacitive touch capability. The ESP32-S2-Saola-1 v1.2 exposes 42 usable pins (GPIO0 is routed to the boot button).
| GPIO | Default / Primary Function | Special Features & Constraints |
|---|---|---|
| GPIO0 ⚡ | Boot Button / Strapping Pin | Pulls LOW on boot to enter UART download mode. Do not use as a standard input without a pull-up. |
| GPIO1 - GPIO10 | General I/O / ADC1 | ADC1 inputs. 🖱️ Touch 1-10. Safe to use freely. Note: S2 has no ADC2. |
| GPIO11 - GPIO18 | General I/O | 🖱️ Touch 11-18. GPIO15-18 are often used for SPI flash on raw modules, but exposed on Saola. |
| GPIO19 🔌 | Native USB D- | Routed to USB-C connector. Do not use for general GPIO if you need USB Serial/JTAG. |
| GPIO20 🔌 | Native USB D+ | Routed to USB-C connector. Do not use for general GPIO if you need USB Serial/JTAG. |
| GPIO21 - GPIO33 | General I/O / SPI / I2S | Standard digital I/O. Excellent for SPI displays, shift registers, and relays. |
| GPIO34 - GPIO44 | General I/O | GPIO35-44 feature 🖱️ Touch. GPIO43 is default TX0, GPIO44 is default RX0 for UART0. |
| GPIO45 ⚡ | Strapping Pin / VDD_SPI Sel | Selects flash VDD voltage (3.3V vs 2.5V). Leave floating or pull HIGH for standard 3.3V modules. |
| GPIO46 ⚡ | Strapping Pin / Log Print | Selects boot log output. Pull LOW to disable ROM log prints (reduces boot noise). |
Rows People Get Wrong (and How to Avoid Bricking)
When migrating from the original ESP32 or ESP8266, makers consistently trip over three hardware realities unique to the S2 silicon.
The original ESP32 has two ADC units (ADC1 and ADC2). The ESP32-S2 only has ADC1 (mapped to GPIO1 through GPIO10). If you port Arduino code that calls
analogRead() on GPIO12, GPIO14, or GPIO27 (classic ADC2 pins), the compiler will throw an error, or the pin will simply read 0. Move all analog sensor inputs to the GPIO1-10 block.
Native USB vs. UART Bridge: The S2 has native USB OTG on GPIO19 and GPIO20. On the Saola-1, these are hardwired to the USB-C port. If you accidentally configure GPIO19 or GPIO20 as standard digital outputs in your setup() function and write them HIGH/LOW, you will disrupt the USB data lines. The board will disconnect from your PC, and you will lose serial monitor output. Always leave 19 and 20 unassigned unless you are explicitly writing USB HID or CDC code.
Strapping Pin Conflicts: GPIO45 controls the internal voltage regulator for the SPI flash. If you wire a sensor that pulls GPIO45 LOW during the exact millisecond the board resets, the S2 will attempt to power the flash at 2.5V instead of 3.3V, resulting in a boot loop or flash corruption. Never use GPIO45, GPIO46, or GPIO0 as inputs for mechanical switches without a hardware debounce and a strong 10kΩ pull-up resistor.
Faded Silkscreen? How to Map Unknown GPIOs
Bench environments are harsh. Flux residue, soldering iron burns, and friction can wipe the silkscreen off cheap clone boards, leaving you with a row of unlabeled headers. Here is how to safely map an ESP32-S2 board with missing markings.
- Find Ground (GND): Set your multimeter to continuity mode. Probe the large thermal pad on the bottom of the ESP32-S2 module or the metal RF shield. Use this as your GND reference to identify the GND header pins.
- Find 3V3 and 5V (VBUS): Power the board via USB. Switch the multimeter to DC Voltage. Probe the remaining power rails against your known GND. You will read ~4.8V-5.1V on VBUS and exactly 3.3V on the logic rail.
- Run a Pin-Sweep Sketch: For the unlabeled GPIOs, upload a simple Arduino sketch that sets each pin (from 1 to 44, skipping 19/20) to
OUTPUTand toggles it HIGH for 2 seconds in a loop. Connect an LED with a 330Ω resistor to GND, and use the free lead to probe the headers. The LED will light up sequentially, allowing you to map the physical pins to their GPIO numbers on paper.
Mains Relay Wiring: NEC vs. IEC Color Standards
The ESP32-S2 operates at 3.3V logic, meaning it cannot drive a mechanical relay directly. You will use an opto-isolated relay module. While the low-voltage GPIO wiring is universal, the mains voltage side of the relay screw terminals must strictly follow your regional electrical codes. Wiring the wrong color to the Line or Earth terminal is a lethal hazard and a fire risk.
Below is the reference for 120V/230V AC wire colors when wiring the load side of your relay module.
| Function | NEC (US / Canada) | IEC 60446 (EU / Modern UK) | Old UK (Pre-2006) |
|---|---|---|---|
| Line (Hot) | Black (or Red for 240V) | Brown | Red |
| Neutral | White (or Gray) | Blue | Black |
| Earth (Ground) | Bare Copper / Green | Green/Yellow Stripe | Green/Yellow Stripe |
Decision Tree: Which ESP32-S2 Dev Board to Buy?
The ESP32-S2 silicon is identical across variants, but the breakout boards differ wildly in exposed peripherals. Use this decision matrix to pick the exact board for your bench.
| Your Project Requirement | Board Variant | Concrete Pick (Buy This) |
|---|---|---|
| General prototyping, breadboard use, basic sensors | Saola-1 | ESP32-S2-Saola-1 v1.2 (Espressif official or WROOM clone) |
| Driving SPI LCDs, I2S audio, or camera interfaces | Kaluga-1 | ESP32-S2-Kaluga-1 Kit (Includes separate LCD and audio header boards) |
| Battery-powered IoT, wearable, or compact enclosures | Mini-1 / Feather | Adafruit Metro ESP32-S2 or ESP32-S2-Mini-1 (Includes LiPo charging BMS) |
| Native USB HID (Keyboards/Mice) with quick deployment | Any S2 Board | ESP32-S2-Saola-1 (Cheapest native USB implementation) |
For 90% of makers building home automation nodes, weather stations, or basic USB-HID macros, the ESP32-S2-Saola-1 v1.2 is the definitive choice. It exposes all 43 GPIOs to standard 0.1-inch headers, fits perfectly across a standard solderless breadboard (leaving one row of holes free on each side), and costs under $6 in bulk. Reserve the Kaluga-1 strictly for projects requiring simultaneous high-speed SPI displays and I2S audio output, as its multiplexed pin headers make standard breadboarding impossible.
Sources: Espressif ESP32-S2 Datasheet, ESP-IDF Saola-1 Hardware Guide, IEC 60446 Wiring Color Standards.






