Customer:
I’m using the Inkplate 6FLICK display with a lithium battery and want to implement a function to measure battery capacity using display.readBattery(). Converting voltage to capacity doesn’t seem straightforward. Do you have experience measuring battery capacity this way? Is there a better method?
Originally submitted via email support on 22 April 2025. Migrated to the forum for community visibility.
Soldered Support:
Battery voltage reaches up to 4.2 when full. Testing shows it’s around 3.2 when the Inkplate display stops refreshing. I recommend setting a low battery alert around 3.6. The relationship isn’t linear, so it’s not perfect, but sufficient to alert the user the device needs charging.
Here’s a function to convert the voltage reading to a battery percentage:
int battVoltageToPercentage(double voltage) {
if (voltage >= 4.2) return 100;
if (voltage <= 3.2) return 0;
// Simple linear approximation
return (int)(((voltage - 3.2) / (4.2 - 3.2)) * 100);
}