Button
A button is a momentary switch: it changes a circuit only while someone is pressing it.
Part images
What it is
A button is a momentary switch: it changes a circuit only while someone is pressing it.
How students use it
Students use buttons for start/stop controls, input choices, games, counters, alarms, and quick tests that prove the Pico can read a real-world input.
Pins and power
Four legs in two connected pairs. SunFounder notes pins 1 and 2 are connected together, and pins 3 and 4 are connected together.
Passive switch. Wire it as a 3.3V-safe digital input with a pull-up or pull-down path.
Pressing the button connects the two sides together. Use one leg from each internal pair; using two legs from the same side will not create a useful input.
Voltage and safety
Keep button circuits tied to 3.3V and GND, not 5V. A floating input will read randomly without a pull-up or pull-down.
Power off before moving the button on the breadboard. Check that the button straddles the center gap when the lesson expects that layout.
Module internals
Spring contact, four through-hole legs, plastic cap, and a small internal metal contact that bridges the two sides when pressed.
Datasheet notes
SunFounder identifies the kit part as a 6 mm mini push-button but does not publish a manufacturer part number. For exact ratings, match the physical button and markings to a tactile-switch datasheet.
Common libraries
No special library is needed. Use machine.Pin with an internal or external pull resistor.
Common mistakes
Rotating the button 90 degrees, wiring both signal wires to the same internal side, forgetting the pull resistor, and treating bouncing contacts as multiple intentional presses.