I am using the following snippet straight out of the reference documentation to get the Bean battery voltage.
int batteryVoltage = Bean.getBatteryVoltage(); // Between 191 and 353 (1.91V-3.53V)
I am getting values, but there are two problems:
1) the max value is always 305 (i.e, 3.05V) even on a new coin cell battery or fully charged LiPo battery
2) As the voltage drops while the battery is consumed, It drops from 305 to 290, then eventually to 274, with no values in between.
Is this by design? Is it possible to get a more accurate battery reading without resorting to an external circuit? The documentation says the accuracy is +-0.01V
I saw a similar problem with the getBatteryLevel call where the percentages are discrete multiples of 10 (50, 40, etc.) instead of values like 50, 49. 48, etc.