User's Manual

Table Of Contents
4-38 Millennial Net
Using the MeshScape API
7. ibApi_Utils_ConvertRawAdcReadingToVoltage()
ibApi_FUNC ibApi_Utils_ConvertAdcReadingToVoltage(
ibApi_DEVICEID device_id,
ibApi_UINT16 adcRaw,
ibApi_FLOAT *adcFloat
);
This function converts a device’s battery level reading from raw data to voltage.
Parameters:
device_id: (input) Device information.
adcRaw: (input) ADC reading in raw data.
adcFloat: (output) Structure to store the ADC reading as a voltage.
Return Value:
ibApi_RESULT_SUCCESS if successful, error code (<0) if not.