Skip to content

MiP_Battery

github-actions[bot] edited this page Aug 10, 2026 · 16 revisions

Class MiP_Battery

MiP_Battery provides one function only, to report MiP's cached battery voltage.

Table of Contents


Constructors & Destructors

MiP_Battery

Signature: MiP_Battery(MiP &mip)

Summary: Constructs the battery manager.

Parameters:

Parameter Description
mip A reference to the main MiP object to access core services.

Public Functions

readVoltage

Signature: float readVoltage()

Summary: Reads MiP's cached battery voltage.

Details:

Reads the most recent cached value of MiP's battery voltage.

The voltage is read from MiP's periodic status updates and is never more than 30 seconds old.

Returns: Battery voltage, typically 4.0V (low) to 6.4V (full).


Clone this wiki locally