Battery replacement notification
Posted: Thu Sep 15, 2016 4:51 pm
How to get a battery change notification for Esp8266 powered using AA batteries?
-->
Open Community Forum for ESP8266, Come share Arduino and IoT (Internet of Things)
https://www.esp8266.com/
at the beginning of sketch
ADC_MODE(ADC_VCC); //vcc read
...
//in loop
float vdd = ESP.getVcc() / 1000.0;
AcmeUK wrote:There is a readvdd33() function but it was causing stack overflows/resets. Not sure if it has been fixed.
The preferred method is this :-
Code: Select allat the beginning of sketch
ADC_MODE(ADC_VCC); //vcc read
...
//in loop
float vdd = ESP.getVcc() / 1000.0;