machine.ADCBlock ================ .. 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/ADCBlock.pyi .. py:module:: machine.ADCBlock Classes ------- .. autoapisummary:: machine.ADCBlock.ADCBlock Module Contents --------------- .. py:class:: ADCBlock(id, *, bits) Access the ADC peripheral identified by *id*, which may be an integer or string. The *bits* argument, if given, sets the resolution in bits of the conversion process. If not specified then the previous or default resolution is used. .. py:method:: connect(channel, source, *args, **kwargs) -> _typeshed.Incomplete Connect up a channel on the ADC peripheral so it is ready for sampling, and return an :ref:`ADC ` object that represents that connection. The *channel* argument must be an integer, and *source* must be an object (for example a :ref:`Pin `) which can be connected up for sampling. If only *channel* is given then it is configured for sampling. If only *source* is given then that object is connected to a default channel ready for sampling. If both *channel* and *source* are given then they are connected together and made ready for sampling. Any additional keyword arguments are used to configure the returned ADC object, via its :meth:`init ` method. .. py:method:: init(*, bits) -> None Configure the ADC peripheral. *bits* will set the resolution of the conversion process.