ESP32 GPIO34
Everything you need to use this pin correctly: status, alternate functions, boot-time cautions and working code.
| Status | Input only |
|---|---|
| Alternate functions | ADC1_CH6 · input only |
| Chip | ESP32 pinout |
Watch out:
- Input-only pin: no output driver and no internal pull-up/pull-down resistor. Add your own pull resistor if you need one.
Practical notes
Input-only pin carrying ADC1_CH6. No internal pull-up/pull-down and no output driver — driving an LED or relay needs external hardware. Safe for ADC sampling since ADC1 is unaffected by Wi-Fi.
Sample code
// Arduino
const int PIN = 34;
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 →