What better port to read the battery voltage, with a resistive divider, on the heltec esp32 wifi kit oled board. Examples are required arduino.
Thank you advance
I think any analog pins can be used as ADC input (green label in pinout diagram).
What’s the problem you have? Can you provide some more details?
Anyway, two things you need attention:
The ADC maximum input voltage ≤ 2.5V, don’t over that value, or the ADC converter will be broken.
If the input voltage is already bigger than 2.5V, you need to have such a voltage dividing circuit:
The value of R10 and R12 may need change to fit your needs.
The ESP32 integrates two 12-bit SAR (Successive Approximation Register) ADCs supporting a total of 18 measurement channels (analog enabled pins).
The ADC driver API supports ADC1 (8 channels, attached to GPIOs 32 - 39), and ADC2 (10 channels, attached to GPIOs 0, 2, 4, 12 - 15 and 25 - 27). However, the usage of ADC2 has some restrictions for the application:
- ADC2 is used by the Wi-Fi driver. Therefore the application can only use ADC2 when the Wi-Fi driver has not started.
GPIO13 is on ADC2, so can only be used without wifi