.enabled Property


For the currently selected ADC channel (selection is made through the adc.num property), defines whether this ADC channel is enabled or disabled.


Enum (no_yes, byte)

Value Range:

0 — NO (default): disabled, the corresponding line is working as a regular GPIO line.

1 — YES: enabled.

See Also:



Setting this property to 0 — NO disables the ADC channel and allows the corresponding line to work as a regular GPIO line. Note that after you set adc.enabled to 0 — NO, the corresponding GPIO line will be configured as an input and its output register will be set to HIGH.

Discard the first result returned by adc.getdata after enabling an ADC channel.

.enabled Property