.Voltage( )

back to FEHBattery

Description

The Proteus battery has a capacity of approximately 11.2-11.7 V. This function will return the voltage charge of the Proteus. It can be used to know when the Proteus needs to be charged again in order to maintain a certain level of performance.

Parameters

None.

Returns

This functions returns the voltage level of the Proteus battery.

Examples

#include <FEHBattery.h>
#include <FEHUtility.h>
#include <FEHLCD.h>

int main(void)
{
    //Print the voltage level of battery every 1/2 second
    while(true)
    {
        // get the voltage level and display it to the screen
        LCD.WriteLine( Battery.Voltage() );
        Sleep( 0.5 );
    }    
}