46 Smartcat (BL2100)
4.4.4 A/D Converter Inputs
The functions in this section apply only to the BL2100 and the BL2120 models.
Calibrates the response of the A/D converter channel as a linear function using the two conversion points
provided. Gain and offset constants are calculated and placed into global table _adcCalib.
PARAMETERS
channel is the A/D converter input channel (0–10).
value1 is the first A/D converter channel value (0–4095).
volts1 is the voltage corresponding to the first A/D converter channel value (-10 V to +10 V).
value2 is the second A/D converter channel value (0–4095).
volts2 is the voltage corresponding to the second A/D converter channel value (-10 V to +10 V).
RETURN VALUE
0 if successful.
-1 if not able to make calibration constants.
SEE ALSO
anaIn, anaInVolts, brdInit
int anaInCalib(int channel, int value1,
float volts1, int value2, float volts2);