Here is an example of a hardware setup to measure the voltage on a Lithium battery with a voltage divider and a connected capacitor. The Lithium battery typically has a voltage range of 2.7 - 4.2 V and we (Nordic) recommend that you divide the batter...