machine.ADCWiPy
Classes
Create an ADC object associated with the given pin. |
|
Module Contents
- class machine.ADCWiPy.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.
- adcchannel() Incomplete
Fast method to read the channel value.
- channel(id, *, pin) 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')
- class machine.ADCWiPy.adcchannel
-
- init() Incomplete
Re-init (and effectively enable) the ADC channel.
- value() Incomplete
Read the channel value.