ESP32 GPIO0
Everything you need to use this pin correctly: status, alternate functions, boot-time cautions and working code.
| Status | Usable |
|---|---|
| Alternate functions | ADC2_CH1TOUCH1 |
| Chip | ESP32 pinout |
Watch out:
- Strapping pin: its level is latched at power-up to configure boot behaviour. Do not attach anything that changes its reset state.
- This is an ADC2 channel, which becomes unavailable while Wi-Fi is running — use an ADC1 channel for reliable sampling.
Practical notes
Strapping pin, also ADC2_CH1 and TOUCH1. Holding it low through reset enters download mode — this is the pin behind the BOOT button on dev boards. As an ADC channel it collides with Wi-Fi; as a digital output, mind the pull-up at boot.
Sample code
// Arduino
const int PIN = 0;
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 →