Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4906

General • Re: Help with Pico ADC project

$
0
0
Are you sure this bit is right?

Code:

# Create an ADC object linked to pin 26adc = ADC(Pin(26, mode=Pin.IN))
I've done very little in microPython on the Pico so far, and could be wrong, but that looks like it's setting the pin up as a GPIO for input, not an ADC channel.

I would use

Code:

# Create an ADC object linked to pin 26adc = ADC(26)
(untested)
3.5 ohms is basically a short circuit. Your ADC will read zero, or close to it.
In that case using an ADC could be unnecessary for that switch. Just a simple GPIO for input to read 1 or 0 for pressed or not.

Statistics: Posted by rpdom — Wed Jun 19, 2024 7:52 am



Viewing all articles
Browse latest Browse all 4906

Trending Articles