Home - Getting Started - Constructor - Initialization - Functions - Examples
deviceFound() - findFirstDevice() - address() - adc() - voltage() - percent() - version() - compensation() - sleep() - isSleeping() - wake() - reset() - quickstart() - alertIsActive() - clearAlert() - threshold()
adc()
Description
Reads the value from the VCELL register on the device. This value reports the 12-bit A/D measurement of battery voltage.
Parameters
None
Returns
value : uint16_t
Example
This snippet of code shows how to calculate the voltage of the battery using the ADC value on a one cell battery.
uint16_t value = FuelGauge.adc();
float voltage = value * 1.25;
Notes
None.