ESP32-S2 GPIO19
Everything you need to use this pin correctly: status, alternate functions, boot-time cautions and working code.
| Status | Usable |
|---|---|
| Alternate functions | USB D−ADC2_CH8 |
| Chip | ESP32-S2 pinout |
Watch out:
- Native USB pin. Using it as ordinary IO disables USB download and debugging.
Practical notes
USB OTG D−, also ADC2_CH8. Native USB is the S2’s headline feature — HID keyboards, USB CDC and more. Reclaiming the pin kills USB for one extra ADC channel, which is rarely a good trade.
Sample code
// Arduino
const int PIN = 19;
void setup() {
Serial.begin(115200);
analogReadResolution(12);
// set attenuation before measuring higher voltages
analogSetAttenuation(ADC_11db);
}
void loop() {
int raw = analogRead(PIN);
Serial.println(raw);
delay(1000);
}
Data verified:2026-10-20 · Cross-checked against Espressif documentation. Always confirm against the official datasheet before finalizing a design. Official docs →