Well, apologies for being snarky but felt I was beating my head against a brick wall with this problem. It was giving me the impression I couldn't complete even the most basic circuits correctly. I even went to the lengths of re-flowing the solder on the headers to make sure there were no bad or touching joints. Most frustrating when I'm trying to learn.No, it's not a joke.
In your case, with Pico 2, the internal pull-down is not strong enough to bring the pin back to 0.
You have to use an external pull-down resistor below 8K, or use the other configuration: internal pull-up + button to GND (the usual setup, despite "the official example").Reference RP2350-E9
Summary Increased leakage current on Bank 0 GPIO when pad input is enabled
Affects RP2350 A2
Note that the pad pull-down (if enabled) is significantly weaker than the leakage current in this state and therefore is not strong enough to pull the pad voltage low. Driving / pulling the pad input low with a low impedance source of 8.2 kΩ or less will overcome the erroneous leakage and drive the voltage below the level where the leakage current occurs, so in this case if the pad is driven / pulled low it will stay low. The erroneous leakage only occurs (and continues to occur) when the pad input enable is enabled; disabling the input enable will reset (remove) the leakage. The pad pull-up still works. If enabled it will pull the pad to IOVDD as it will pull the input voltage out of the problematic range.
But I changed the code to PULL_UP and rewired, and the IRQ_RISING to FALLING in the reaction game I was doing, and all seems fine now. So it appears that its something to be aware of if you're new and using a Pico on latest micropython release.
Thanks for the help, I feel better having got it working, and have now put it down for the day to take a breath.
Statistics: Posted by JustJodieMay — Sun Dec 29, 2024 9:03 pm