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

General • Re: Button causing problems with pico w

$
0
0
The images are not displayed correctly.

https://drive.google.com/file/d/18H3T_X ... sp=sharing
https://drive.google.com/file/d/189hbJp ... sp=sharing

Fiddled these links from the forum web page source.

For proper function, there is pullup needed on the button-gpio-pin. The button - when pressed - connects the GPIO to GND, hence a pullup.

Code:

button = machine.Pin( 28, machine.Pin.IN, machine.Pin.PULL_UP)
My debug strategy would be:
- add the pullup property to the GPIO pin !
- remove the button gpio wire for a moment. Input should be rock stable '1'
- doublecheck the button functionality; remove the wires and check open, close with a multimeter.
- twist the button connecting wires twisted.jpg. There are flourescent lights in the room, could cause magnetic interference.
- add an external pullup of 1k from button GPIO to VCC 3.3V
- check the button. The contacts are pretty short and looks if on right side these are not inserted into breadboard (not needed on right side, but perhaps it looks the same on left side which can't be seen on the image).
That helped so much - it works now. Thank you!

Statistics: Posted by catriona — Sun Apr 07, 2024 3:12 pm



Viewing all articles
Browse latest Browse all 4803

Trending Articles