How to measure the USB input port voltage?

Hello Electron fellas,

This is my very first post here.

A colleague give away to me a Particle Electron device some time ago, now at this point I have been playing with the device a bit, but now I want to do more serious things.

In order to prologue my setup autonomy, I’ve connected my Electron device to an small battery pack as show in the picture, I’m want to know if is there some way (or method) to programmatically

(or at least know if the voltage is in a valid range).

Thanks in advance.

Use the FuelGauge API to talk to the onboard charge monitor IC.