Home - Getting Started - Constructor - Initialization - Functions - Examples
deviceFound() - findFirstDevice() - address() - adc() - voltage() - percent() - version() - compensation() - sleep() - isSleeping() - wake() - reset() - quickstart() - alertIsActive() - clearAlert() - threshold()
voltage()
Description
Computes the voltage based on the current VCELL (ADC) value using the voltage increments passed into the library in the constructor.
Parameters
None
Returns
voltage : float
Example
This code snippet demonstrates hwo to get the voltage and display it on the serial port.
float voltage = FuelGauge.voltage();
Serial.print("The battery voltage is "); Serial.println(voltage);
Notes
None.