Are you sure this bit is right?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(untested)
Code:
# Create an ADC object linked to pin 26adc = ADC(Pin(26, mode=Pin.IN))
I would use
Code:
# Create an ADC object linked to pin 26adc = ADC(26)
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.3.5 ohms is basically a short circuit. Your ADC will read zero, or close to it.
Statistics: Posted by rpdom — Wed Jun 19, 2024 7:52 am