Read Battery Voltage
When running your Inkplate 6COLOR board on a Li-ion battery, it's helpful to know the battery's condition. Inkplate 6COLOR lets you measure the battery voltage directly, giving you an estimate of remaining capacity and help you decide if it's time to recharge.

Battery connection
⚠️
Connecting and using the battery correctly is important! Please refer to the Inkplate battery page for detailed info.
Reading battery voltage
from inkplate6COLOR import Inkplate
# Create Inkplate object
inkplate = Inkplate()
# Initialize the display
inkplate.begin()
# Get battery voltage
bat_capacity = inkplate.readBattery()
# Print current battery voltage
inkplate.print(f"Battery capacity: {bat_capacity:.2f} V")
# Update the display
inkplate.display()

Fully charged battery example
ℹ️
Expected values are around 4.2V when full and 3.7V when empty.
inkplate.readBattery()
Reads the current battery voltage when running on battery power
Returns type: float
Returns value: Returns the measured battery voltage