I'm Powering a breadboard with the pyboard 3.3 V and Gnd pins and reading an analog value on pin X11. The adc value read was incorrect (checked with multimeter). Using the same code I switched to pin X19 and the adc value read is correct. The difference between the adc values read on X11 and X19 is near a factor of 2 (1202 and 2169).
Question: is there something special I need to do to make X1-X8 and X11-X12 read more accurately?
Reason: I have a need for 7 adc pins for analog and there are only 4 shielded ones (X19 - X22).
ADC Pin Question
Re: ADC Pin Question
What code were you using to read the ADC?
What device do you have connected to the input?
What device do you have connected to the input?
Re: ADC Pin Question
just realized I was using
adc = ADC(Pin('X11')) rather than adc = ADC(Pin('Y11'))
wasted hours on that issue.
adc = ADC(Pin('X11')) rather than adc = ADC(Pin('Y11'))
wasted hours on that issue.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: ADC Pin Question
You guys aren't alone - I've just spent the best part of a day tracking down an "obscure bug" which turned out to be a pin header one pin short of the mating socket
He who never made a mistake never made anything.
He who never made a mistake never made anything.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.