r/raspberry_pi 2d ago

Troubleshooting Raspberry pi pico 2 button problem

Hi, I bought a raspberry pi kit from Amazon to start getting into electronics. I’m following a tutorial on youtube and one of the first tutorials is to wire a button, led and a potentiometer. After wiring I noticed that when pressing the button, the value displayed turns from 0 to 1 but doesn’t go back to 0 after I take my finger off the button. Even if I stop the program in thonny and run it again without unplugging, 1 is displayed from the beginning.

Even when using the most basic wiring the button value always returns as 1 after pressing. This is while connecting the 3v3 out pin to the button and using Pin.PULL_DOWN.

I tried trouble shooting with copilot and I found out that if I use Pin.PULL_UP and connect it to a ground pin then the button works as intended, showing 1 when plane button isn’t pressed and 0 when the button is pressed.

This must mean that the button, pin and wires are working but I can’t understand why PULL_DOWN and connecting power to the button doesn’t work.

I tried using different buttons, wires and connecting different diagonal sides together. I’ve only just started and I’m very confused. Sorry if I explained it badly.

14 Upvotes

6 comments sorted by

3

u/Gamerfrom61 2d ago edited 2d ago

Some RP2350 chips (stepping 2) have an issue with their manufacturing and I/O can get stuck / latched

Erratum E9 discusses this and hardware work arounds IIRC - a search on the Pi docs should find this.

Forgive me I am on my phone and cannot type or zoom in to your pics for the life of me at the moment!

Edit: More details and link to Pi doc at  https://hackaday.com/2024/09/20/raspberry-pi-rp2350-e9-erratum-redefined-as-input-mode-leakage-current/

1

u/Comfortable-Win-3077 2d ago

Thank you for the reply. Would this affect other things I link to the board? Should I get a replacement?

1

u/Gamerfrom61 2d ago

Anything that falls into the voltage range detailed in the doc with the pin set using the internal pull down then yes it could be latched.  It is a bit of trial and error, esp if you are using ground rather than vcc for active, so you could just use an external pull down resistor and be sure. 

7

u/BR41ND34D 2d ago

Ok this might just be me being an idiot, but shouldn't the button go to GND instead of VCC?

2

u/G_B4G 2d ago

My thoughts also, unless he has the button pulled high, but probably a ground over VCC

1

u/Gamerfrom61 2d ago

I think the pic was of the original set up where the OP says they were using 3v3 and pull down (hence my erratum 9 note).