.getdata Method

Function:

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

Syntax:

adc.getdata() as word

Returns:

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

See Also:

---


Details

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.


.getdata Method

Details