Skip to content
Snippets Groups Projects
Select Git revision
  • d87faf9bd19df32d74c0cfe13428394f1ce22d47
  • main default protected
  • phhw
  • captouch-threshold
  • t
  • dos
  • test2
  • test
  • slewtest
  • simtest
  • view-think
  • vm-pending
  • media-buf
  • scope
  • passthrough
  • wave
  • vsync
  • dos-main-patch-50543
  • json-error
  • rahix/big-flow3r
  • pippin/media_framework
  • v1.3.0
  • v1.2.0
  • v1.2.0+rc1
  • v1.1.1
  • v1.1.0
  • v1.1.0+rc1
  • v1.0.0
  • v1.0.0+rc6
  • v1.0.0+rc5
  • v1.0.0+rc4
  • v1.0.0+rc3
  • v1.0.0+rc2
  • v1.0.0+rc1
34 results

machine.ADCBlock.rst

Blame
  • Forked from flow3r / flow3r firmware
    1529 commits behind, 14669 commits ahead of the upstream repository.
    machine.ADCBlock.rst 1.82 KiB

    class ADCBlock -- control ADC peripherals

    The ADCBlock class provides access to an ADC peripheral which has a number of channels that can be used to sample analog values. It allows finer control over configuration of :ref:`machine.ADC <machine.ADC>` objects, which do the actual sampling.

    This class is not always available.

    Example usage:

    from machine import ADCBlock
    
    block = ADCBlock(id, bits=12)  # create an ADCBlock with 12-bit resolution
    adc = block.connect(4, pin)    # connect channel 4 to the given pin
    val = adc.read_uv()            # read an analog value

    Constructors

    Methods