Read power voltage, how to?

Hi

Any way I can read power voltage on Seeed XIAO RP2040?

I am running off of a 3.7v Li-ion and I need to know when to disconnect the battery to avoid undervoltage damaging the battery.

I am currently not able to make any HW changes. I can only make SW changes. So need to find a way via software.

Is there one?

I am using the Arduino IDE.

Thanks!

Hi there,
Why not use one of the analog inputs to read the battery voltage, do some pre measurements and with an elapsed timer calculate how much should be left vs. what is measured and adjust the code sleep time to accommodate it.
Is what I would try.
HTH
GL :slight_smile: PJ :v:

Hi,

Here is a method: