# ESP32-S3 GPIO Map This document defines the active firmware GPIO assignments for the current battery-sensing ESP32-S3 board revision. Signal direction is described from the MCU's perspective. Older 2026-07-24 drawings assigned GPIO9 to a legacy power hold net; that assignment is not valid for the current board. ## GPIO Table | U5 Pin | GPIO | Net | Direction | Connection / Function | Notes | | --- | --- | --- | --- | --- | --- | | 1 | GND | GND | N/A | Ground reference | Ground reference | | 2 | 3V3 | 3V3 | Power | 3.3 V supply rail | Power rail | | 3 | EN/RST | EN | Input | Chip enable and reset input | Reset and enable | | 4 | GPIO4 | TP_INT | Bidirectional | Optional touch interrupt / reusable IO | Not connected by the 8-wire LCD adapter | | 5 | GPIO5 | TP_SDA | Bidirectional | Optional touch I2C SDA / reusable IO | Not connected by the 8-wire LCD adapter | | 6 | GPIO6 | TP_SCL | Input | Rocker microswitch / original SW2 function | Reuses the touch-clock contact left open by the 8-wire LCD adapter; active-low with internal pull-up | | 7 | GPIO7 | BLK | Output | LCD adapter backlight control | Active-high firmware default | | 8 | GPIO15 | CS | Output | ST7789P3 SPI chip select | Active low | | 9 | GPIO16 | DC | Output | ST7789P3 data/command select | Also named A0 by the panel specification | | 10 | GPIO17 | RES | Output | ST7789P3 hardware reset | Active low | | 11 | GPIO18 | MOSI | Output | ST7789P3 SPI data / SDA | 4-line SPI write data | | 12 | GPIO8 | CLK / Swing | Output | ST7789P3 SPI clock | Do not drive the Swing function while the LCD is connected | | 13 | GPIO19 | ESP_D_N | Bidirectional | USB D- | Type-C | | 14 | GPIO20 | ESP_D_P | Bidirectional | USB D+ | Type-C | | 15 | GPIO3 | touch | Input | TTP223 touch-button output | Present on the board but not consumed by the current input policy | | 16 | GPIO46 | UNASSIGNED | N/A | No connection assigned | Reserved; no signal assigned | | 17 | GPIO9 | Power_t | Analog input | Battery voltage sense | R17=100 kOhm from VBAT and R18=100 kOhm to GND; ADC voltage is one half of VBAT | | 18 | GPIO10 | Charge | Input | TP4057 charger status | Active-low while charging; high means full or external power absent | | 19 | GPIO11 | PA_CTRL | Output | Audio power-amplifier enable | Amplifier control | | 20 | GPIO12 | SW1 | Input | Button 1 / turntable calibration switch | External 10 kOhm pull-up; active low | | 21 | GPIO13 | SW2 | Input | Button 2 / K2 push-to-talk input | External 10 kOhm pull-up; active low | | 22 | GPIO14 | UNASSIGNED | N/A | No connection assigned | Reserved; no signal assigned | | 23 | GPIO21 | IN4 | Output | ULN2003 IN4 | Stepper motor phase control | | 24 | GPIO47 | IN3 | Output | ULN2003 IN3 | Stepper motor phase control | | 25 | GPIO48 | IN2 | Output | ULN2003 IN2 | Stepper motor phase control | | 26 | GPIO45 | IN1 | Output | ULN2003 IN1 | Stepper motor phase control | | 27 | GPIO0 | BOOT | Input | Boot/download switch | 10 kOhm pull-up to 3V3 | | 28 | GPIO35 | UNASSIGNED | N/A | No connection assigned | Reserved; no signal assigned | | 29 | GPIO36 | UNASSIGNED | N/A | No connection assigned | Reserved; no signal assigned | | 30 | GPIO37 | UNASSIGNED | N/A | No connection assigned | Reserved; no signal assigned | | 31 | GPIO38 | I2S_MCLK | Output | ES8311 MCLK | Audio interface | | 32 | GPIO39 | I2S_SCLK | Output | ES8311 SCLK | Audio interface | | 33 | GPIO40 | I2S_DSDIN | Output | ES8311 DSDIN | Audio interface | | 34 | GPIO41 | I2S_LRCK | Output | ES8311 LRCK | Audio interface | | 35 | GPIO42 | I2S_ASDOUT | Input | ES8311 ASDOUT | Audio interface | | 36 | RXD0 | esp_tx | Input | Debug UART | Routed to J2 | | 37 | TXD0 | esp_rx | Output | Debug UART | Routed to J2 | | 38 | GPIO2 | IO2_I2C_SCL | Bidirectional | ES8311 control interface SCL | Audio codec | | 39 | GPIO1 | IO1_I2C_SDA | Bidirectional | ES8311 control interface SDA | Audio codec | | 40 | GND | GND | N/A | Ground reference | Ground reference | | 41 | GND | GND | N/A | Ground reference | Ground reference |