.getdata Method


Performs a single conversion and returns the current voltage on the selected ADC channel (selection is made through the adc.num property).


adc.getdata() as word


A value proportional to the input voltage as measured by the ADC.

See Also:



The value range returned by this method is platform-specific.

Discard the first result returned by this method after booting up your device, enabling the currently selected ADC channel (through adc.enabled), or changing the selected channel (through adc.num).

Attempting to execute this method on a channel that is currently disabled ( adc.enabled = 0 — NO) will return 0.