I am running some ESP's on batteries. Is there any way to read battery voltage like I can in Arduino...
ADC_MODE(ADC_VCC)
ESP.getVcc()
or will I have to read the voltage via a resistor divider on the ADC pin?
Reading Battery Voltage internally
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: Reading Battery Voltage internally
ESP8266 has one adc pin, but it can't read internal voltage.mikruth wrote:I am running some ESP's on batteries. Is there any way to read battery voltage like I can in Arduino...
ADC_MODE(ADC_VCC)
ESP.getVcc()
or will I have to read the voltage via a resistor divider on the ADC pin?
Re: Reading Battery Voltage internally
The ESP8266 hardware can do it, however, this has to be enabled at the time of compiling the firmware/flashing, and MicroPython doesn't have support for it.
Re: Reading Battery Voltage internally
Thanks for that. I will just have to use resistors.