A simple way to monitor battery life through Arduino: Analog to Digital Converter.
1) Input battery voltage through 10k resistor (current protection)
2) Compare to [analog reference voltage] (https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/)
3) Reference voltage can also be determined by measuring between Arduino's 5V and gnd. (Mine is 4.85 V for some reason)
4) ref voltage * (analog count)/1024
A simple way to monitor battery life through Arduino: Analog to Digital Converter. 1) Input battery voltage through 10k resistor (current protection) 2) Compare to [analog reference voltage] (https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/) 3) Reference voltage can also be determined by measuring between Arduino's 5V and gnd. (Mine is 4.85 V for some reason) 4) ref voltage * (analog count)/1024