Home - Getting Started - Constructor - Initialization - Functions - Examples
deviceFound() - findFirstDevice() - address() - adc() - voltage() - percent() - version() - compensation() - sleep() - isSleeping() - wake() - reset() - quickstart() - alertIsActive() - clearAlert() - threshold()
wake()
Takes the device out sleep mode. After exiting Sleep mode, fuel-gauge operation continues from the point it was halted.
Parameters
None
Returns
successful : bool
Example
The sample code below demonstrates how to check if the device is in sleep mode and then puts it in sleep mode if it is not.
if (FuelGauge.isSleeping())
{
FuelGauge.wake();
if (!FuelGauge.isSleeping())
{
Serial.println("Fuel Gauge is now awake.");
}
else
{
Serial.println("Failed to wake Fuel Gauge.");
}
}
else
{
Serial.println("Fuel Gauge is already awake.");
}
Notes
See also sleep() and isSleeping().