How are ADC_1 & ADC_2 defined in pin descriptions? Is there a way to switch between the two?
Hi Robert,
All the details can be found here :
ESP32 Pinout Reference: Which GPIO pins should you use?
Analog to Digital Converter (ADC)
The ESP32 has 18 x 12 bits ADC input channels (while the ESP8266 only has 1x 10 bits ADC). These are the GPIOs that can be used as ADC and respective channels:
- ADC1_CH0 (GPIO 36)
- ADC1_CH1 (GPIO 37)
- ADC1_CH2 (GPIO 38)
- ADC1_CH3 (GPIO 39)
- ADC1_CH4 (GPIO 32)
- ADC1_CH5 (GPIO 33)
- ADC1_CH6 (GPIO 34)
- ADC1_CH7 (GPIO 35)
- ADC2_CH0 (GPIO 4)
- ADC2_CH1 (GPIO 0)
- ADC2_CH2 (GPIO 2)
- ADC2_CH3 (GPIO 15)
- ADC2_CH4 (GPIO 13)
- ADC2_CH5 (GPIO 12)
- ADC2_CH6 (GPIO 14)
- ADC2_CH7 (GPIO 27)
- ADC2_CH8 (GPIO 25)
- ADC2_CH9 (GPIO 26)
And what do you mean by that?
Is there a way to switch between the two?
Take a look at this tutorial to better understand how to use them:
What does ADC1_ & ADC2_ refer to? Are they set values for every board? I have an Adafruit Huzzah32 board & their ADC1 & ADC2 define different pins. Just wondering if they can be reassigned?
Adafruit Huzzah32 – ESP32 Feather
Take a look at section GPIO & Analog Pins.
Reassignment is not possible here…
MCU (ESP32) pins are assigned by Espressif.
PCB (Huzzah32) pins are assigned by Adafruit.
Thanks for answering my questions. I understand the use of these pins better now.