-->
Page 1 of 1

Check Battery Level

PostPosted: Thu Mar 16, 2017 11:01 am
by obenavidez
Hello i have an ESP8266 with NodeMCU 0.9.6 build 20150704, is connected to a li-po 3.7V and 500mAh, in the VCC and the GND, i want to know if there is a way to read the battery level from LUA and turn on a led if is low the battery, or i need some special hardware configuration, thanks for your help.

Re: Check Battery Level

PostPosted: Thu Mar 16, 2017 3:10 pm
by marcelstoer
The first thing really with such ancient firmware is to build a recent and supported version: http://nodemcu.readthedocs.io/en/latest/en/build/#tools

Then you flash the binary: http://nodemcu.readthedocs.io/en/latest/en/flash/

Then you use the ADC module to retrieve the information you need: http://nodemcu.readthedocs.io/en/latest/en/modules/adc/

Re: Check Battery Level

PostPosted: Fri Mar 17, 2017 1:14 am
by trackerj
Related Articles below:

- ESP8266 Internal ADC
- ESP8266 - Internal ADC 2 - the easy way example - Voltage divider example