Search code examples
luamicrocontrolleresp8266nodemcu

Check the battery status with NodeMCU?


I use an ESP8266 dev board from NodeMCU with Lua. I power my chip with two AA batteries, which gives me 3V. See this:

https://www.hackster.io/noelportugal/ifttt-smart-button-e11841

enter image description here

How do I check the battery status using NodeMCU?


Solution

  • With a recent firmware you can use adc.readvdd33(). That should be enough for your case