ADC Pins
-
I'm trying to use the ADC, and I don't understand the pinout/library setup.
I'm using this code, from an example I found (but it seems in line with the docs at https://docs.pycom.io/pycom_esp32/library/machine.ADC.html):
adc = ADC(0) adc_c = adc.channel(pin='P13')This seems to read pin 5, which as far as I can tell is GPIO 36 and ADC1_0 - what does P13 mean, an how can I figure out what to put in for other pins? If I try 'P5', which would make logical sense, it throws an exception. From the pinout, it seems that they are sort of the same but not really?
Also, it's a real shame that AREF is not available - it would be nice to be able to plug in a potentiometer and have it work, without faffing around with voltage dividers
-
This seems to read pin 5, which as far as I can tell is GPIO 36 and ADC1_0 - what does P13 mean, an how can I figure out what to put in for other pins? If I try 'P5', which would make logical sense, it throws an exception. From the pinout, it seems that they are sort of the same but not really?
https://docs.pycom.io/pycom_esp32/pycom_esp32/datasheets.html
-
Yup, I've got the pinout sheet - I don't know how to decode it. There's one physical pin, with G5 next to it on the expansion board. The pinout lists: 5, GPIO36, ADCPA, ADC1_0, RTCIO0, SensVP and P13 next to it. 5 and P13 are both coloured as a physical pin. What's the deal? It seems confusing!
-
@mo-seph
I always write 'PXX'
but you have right this is confusing
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login