machine.ADCWiPy =============== .. This document was autogenerated by Sphinx-autoapi from a .pyi stub or a source code file. .. Do not edit this file, instead edit the source file and run Sphinx to update. .. Source: docs/stubs/machine/ADCWiPy.pyi .. py:module:: machine.ADCWiPy Classes ------- .. autoapisummary:: machine.ADCWiPy.ADCWiPy machine.ADCWiPy.adcchannel Module Contents --------------- .. py:class:: ADCWiPy(id=0, *, bits=12) Create an ADC object associated with the given pin. This allows you to then read analog values on that pin. For more info check the `pinout and alternate functions table. `_ .. py:method:: adcchannel() -> _typeshed.Incomplete Fast method to read the channel value. .. py:method:: channel(id, *, pin) -> _typeshed.Incomplete Create an analog pin. If only channel ID is given, the correct pin will be selected. Alternatively, only the pin can be passed and the correct channel will be selected. Examples:: # all of these are equivalent and enable ADC channel 1 on GP3 apin = adc.channel(1) apin = adc.channel(pin='GP3') apin = adc.channel(id=1, pin='GP3') .. py:method:: deinit() -> None Disable the ADC block. .. py:method:: init() -> None Enable the ADC block. .. py:class:: adcchannel .. py:method:: deinit() -> None Disable the ADC channel. .. py:method:: init() -> _typeshed.Incomplete Re-init (and effectively enable) the ADC channel. .. py:method:: value() -> _typeshed.Incomplete Read the channel value.