A switch opens and closes a circuit. When it's closed, current flows; when it's open, the loop is broken. Your kit has small push buttons that close the circuit only while you press them. In this lesson you find out how their four legs are connected and use them to switch an LED, and then to make simple logic gates.
What you'll learn
- What a switch does in a circuit
- How the four legs of a push button are connected
- Why push buttons sit across the gap on a breadboard
- How two switches make AND and OR logic
What you need
- UNO R3 board and USB cable (UNO R3 Starter Kit)
- 2 push buttons
- 1 red LED
- 1 resistor, 220 Ω
- Breadboard and jumper wires (UNO R3 Starter Kit)
Inside a push button

The push button has four legs, but they work as two pairs. The two legs that come out of opposite sides of the button are always connected to each other. Pressing the button connects the two pairs. Placed across the gap in the middle of the breadboard, with two legs in row e and two in row f, the legs line up so that columns 20 and 22 are joined only while you press.
Wiring

| From | To |
|---|---|
| UNO 5V | Bottom + rail (red wire) |
| UNO GND | Bottom − rail (black wire) |
| Push button | Across the gap: legs in 20e, 22e, 20f and 22f |
| + rail | Column 20, row j |
| Resistor 220 Ω | Column 22 (row h) to column 26 (row h) |
| LED long leg (+) | Column 26, row f |
| LED short leg (−) | Column 27, row f |
| Column 27, row j | − rail |
If the button doesn't fit easily, turn it 90 degrees: the legs only fit one way across the gap.
Try it
- Plug in the USB cable. The LED is off.
- Press the button: the LED lights. Let go: it goes off. The button closes the loop only while you press it.
- AND: unplug and add a second button after the first, so the current has to go through both (they are in series). Put it across the gap with its legs in columns 24 and 26, join column 22 to column 24 with a short wire, and move the resistor so it goes from column 26 to column 30, with the LED in columns 30 and 31. Now the LED only lights when you press button 1 and button 2.
- OR: go back to the first circuit and put the second button next to it instead (in parallel), with its legs in columns 30 and 32. Connect column 30 to the + rail and column 32 to column 22 with short wires. Now the LED lights when you press button 1 or button 2, or both.

AND and OR are called logic gates. The processor in a computer or phone is made of billions of tiny switches wired up like this.
Other switches in your kit
The tilt switch is a small tube with a metal ball inside. When it's upright, the ball touches two contacts and closes the circuit; tip it over and the circuit opens. Swap it in for the button and tilt the breadboard.
Try this next
- Make a "safety switch": two buttons in series that must be pressed at the same time, like on some machines that keep both hands away from danger.
- Combine the button with the series and parallel lesson: one button that turns on two LEDs in parallel.
- Make a "doorbell light": put a button at each end of the breadboard in parallel, and the LED lights from either one.
Troubleshooting
- Nothing lights up: check that the USB cable is plugged in (the UNO's ON LED is lit), that the long leg of the LED goes to the + side, and that every wire sits in the column the table says. Wiggle each wire gently; a wire that isn't pushed all the way in is the most common fault.
- The LED is always on: the button is turned the wrong way, so the always-connected pair joins columns 20 and 22. Turn it 90 degrees.
- The button doesn't stay in: straighten the legs with pliers and push it firmly into the board until it clicks into place.