|Top Previous Next|
Converts an analog input to a digital value.
An integer value from 0 to max proportional to the voltage on the pin.
The input voltage is measured relative to the selected voltage reference. The actual voltage on the pin can be computed as follows:
V = Vref * Cell.ADC.convert(pin) / Cell.ADC.max;
where Vref has been assigned the actual reference voltage.
Any pin used for analog input should be designated as such with the enable property. This will reduce the the load on the analog source and allow a more accurate conversion.