ESP32 and ADC class - pin numbering scheme?
Posted: Mon May 03, 2021 1:18 pm
First time using Micropython on ESP32.
I've got the ESP32-WROOM-32 with esp32-20210418-v1.15.bin
I'm using a development board with this pinout
I'm trying to use the ADC library described in the documentation
As this refers to "Pin", it is confusing what numbering scheme is being used. The ADC channels have a numbering scheme from ADC0 to ADC15. I rule it out since the library docs say "pins 32-39". The GPIOs have a numbering scheme. The pins of the ESP-WROOM-32 module also have a numbering scheme.
What numbering scheme is used in the statement "adc = ADC(Pin(32)) " ?
I've got the ESP32-WROOM-32 with esp32-20210418-v1.15.bin
I'm using a development board with this pinout
I'm trying to use the ADC library described in the documentation
Pins 32-39 correspond to 8 ADC channels. On my development board there appears to be 16 ADC inputs.ADC (analog to digital conversion)
On the ESP32 ADC functionality is available on Pins 32-39.
Code: Select all
from machine import ADC
adc = ADC(Pin(32)) # create ADC object on ADC pin
adc.read() # read value, 0-4095 across voltage range 0.0v - 1.0v
What numbering scheme is used in the statement "adc = ADC(Pin(32)) " ?