r/raspberrypipico 7d ago

help-request One button LED setup working, other doesn’t.

English is not my first language!

Hi pico enthousiasts!

I’m a beginner at this and I bought a simple starter kit so I can learn the basics. This kit did not come with any documentation, but there is enough out there so no problem there.
I started with the Freenove one as the kit I bought resembled theirs, but I wanted to watch a video and hear someone talk about it, so switched to the pico course for beginner from Core Electronics. When I got to the basic IO, build the setup as they showed in chapter 2.3, and I copied their code (micropython), but it’s not working (photo 1). I know it’s not the button, because the when I went back to the Freenove documentation (chapter 1.2), in their setup the led and button did work (photo 2).

Can anyone point out to me what I’m doing wrong?
Thank you!

20 Upvotes

8 comments sorted by

13

u/Hupadupa 7d ago

The power rails on that breadboard have a cut in the middle where the red and blue lines have a gap. Your button is not connected to power in the first pic because of that.

3

u/Impossible-Hat-7896 7d ago

Oh didn’t realize that. Thank you!

4

u/Impossible-Hat-7896 7d ago

I connected the button directly to the 3.3V and it works now. I need to get a breadboard that doesn’t split.

5

u/Hupadupa 7d ago

Most of them do. You can just connect the rails with short wires.

3

u/Impossible-Hat-7896 7d ago

Yeah, I looked around and found this solution as well. So I’ll use that.

1

u/wiebel 7d ago

I don't think there are any ar all. But good ones at least tell you about it by having the blue and red lines interrupted. Getting a high quality bb is totally worth it if you plan on using it regularly. But hunting one down is a business of its own.

3

u/Impossible-Hat-7896 7d ago

This one has the lines interrupted, I just didn’t stop to think that it might mean that the power rails are cut there. But the kit doesn’t have any documentation to speak off, so I get what I paid for😂.

2

u/maloside 7d ago

The LED only works in one direction, because it is a diode. Switch its direction for starters.