In the M0 tutorial... https://learn.adafruit.com/adafruit-fea ... ng-battery
you are reading the Lipo Voltage and convert the reading to voltage with the following code.
Code: Select all
#define VBATPIN A7
float measuredvbat = analogRead(VBATPIN);
measuredvbat *= 2; // we divided by 2, so multiply back
measuredvbat *= 3.3; // Multiply by 3.3V, our reference voltage
measuredvbat /= 1024; // convert to voltage
Serial.print("VBat: " ); Serial.println(measuredvbat);
So the line
Code: Select all
measuredvbat /= 1024; // convert to voltage
Code: Select all
measuredvbat /= 4096; // convert to voltage