Yes, I often have a set-up like this on my Arduino based PCB, so that I can measure the voltage of the battery supplying the Arduino. Easy to program in some check and blink a led (crazily) if the voltage goes below a certain level.
Saves having to measure voltage with a voltmeter…to find out if it needs charging.