XIAO Sense - charging a LiPo battery

Disclaimer: I am not an expert, just sharing my experiences

A few comments:

  1. I am using a LiPo battery, not 2x AA batteries as a power source
  2. I measured the actual voltage against the code when NOT connected to USB, and it’s close enough for my purposes. You may have to adjust your multiplier from “3.3” to match the ADC readings with your volt meter
  3. I also noticed that when ALSO connected to USB, the voltage at the battery connectors is higher.