Detecting charge level of a LiPo Battery

As @bko and @AndyW suggest, a fuel gauge is the way to go, it will give you an actual "level of charge".

If like me you want something super quick just to give a Low Battery alarm you could use a voltage divider and read the voltage using a analog input. I wanted to measure the voltage of a 3S lipo pack and make sure its above 10.5v before running the motors. Have a read of this post

Its probably worth having a read to see how the resistors work to reduce the voltage to a safe level before connecting to an input, as your 10k resistor wont reduce the voltage but will just limit the current. although the pins on the photon are 5v tolerant there are some rules to prevent damage.
[1] FT = 5.0V tolerant pins. All pins except A3 and DAC are 5V tolerant (when not in analog mode). If used as a 5V input the pull-up/pull-down resistor must be disabled.

And a handy site for calculating resistor values for the divider.. here

1 Like