T ThinkEdge Learn

Arduino push button projects for beginners

The simplest input there is — a button, two wires and a decision. Here it lights a LED, rings a buzzer, positions a servo and runs a race.

14 projects Beginner first Arduino uno, Arduino nano, Arduino mega

A button is two contacts and a gap. Closing the gap pulls a pin to ground, and the Arduino notices. There is no timing, no calibration and no protocol — which is exactly why it is the right first input, and why everything more complicated later still ends up being a decision about a pin being high or low.

The subtlety is INPUT_PULLUP. Most beginner tutorials wire the button to 5 V and a pin, and then the pin reads LOW when the button is pressed — the opposite of what the LED tutorial did. The projects here all use the pull-up, so the logic is the same in every one of them: pressed means LOW.

What you need

The parts below are the ones the most of these projects share. Each project page lists the full set for that build.

PartUsed byWhy
Breadboard8Holds the circuit together without solder
1× breadboard6Holds the circuit together without solder
1× Arduino Uno R36The board that runs the sketch
5× jumper wires4The wires that join it up
1× buzzer3The output you can hear working
1× 9V battery3The supply the circuit runs on

All 14 arduino push button projects

Easiest first. Each card links to the project's own page with the wiring, the parts and the code written out.

Relay Driver

Switching a 50 mA lamp from a 20 mA pin

Tier 1 · Basics · Beginner · 25 min
Arduino — Button + Buzzer Doorbell

Press the button, hear a tone. The classic Arduino starter.

Tier 1 · Basics · Easy · 20 min
Servo — Two Buttons, Two Positions

Press A → go to 0°. Press B → go to 180°.

Tier 2 · Logic & Sensors · Easy · 25 min
Morse Code Telegraph

How the first internet worked — one click at a time

Tier 2 · Logic & Sensors · Easy · 25 min
Binary Counter — How Computers Count

Four LEDs, sixteen numbers — counting in twos

Tier 2 · Logic & Sensors · Easy · 25 min
Classroom Voting Machine

Three buttons, three options, instant democracy

Tier 2 · Logic & Sensors · Easy · 30 min
Conveyor Belt Counter

Count objects on a moving line — like a real factory sensor

Tier 2 · Logic & Sensors · Easy · 25 min
Arduino Nano — Reaction Timer Game

How fast can you press the button? Built in a tiny form factor.

Tier 2 · Sensor Projects · Intermediate · 30 min
Arduino Nano — 4-Note Mini Piano

Four buttons, four notes, one tiny piano that fits in your pocket

Tier 2 · Sensor Projects · Intermediate · 30 min
Arduino — Two-Player Reaction Battle

Two players, two buttons — fastest finger wins

Tier 2 · Sensor Projects · Intermediate · 30 min
Simon Says — Memory Game

Repeat the pattern, level by level

Tier 3 · Combined Projects · Intermediate · 45 min
Arduino Mega — Traffic Light Controller

A full intersection with pedestrian crossing — and a buzzer

Tier 3 · Combined Projects · Intermediate · 40 min
Toy Elevator Controller

Limit switches and motor control — the basics of elevator design

Tier 3 · Combined · Intermediate · 45 min
Arduino — Music Box

Press the button, hear a complete melody. Arrays + delays = music.

Tier 3 · Combined Projects · Intermediate · 30 min

How to use these with a class

These 14 projects run from about 20 minutes to 45 minutes each, and 2 of them are Tier 1 — one component and one idea, which is what a class can finish in a single period.

Each project page carries the full build — the concept, the parts, the wiring one step at a time and the sketch — so a class can work through it without the teacher having to explain every wire.

Every one of them can be practised in the browser simulator first, with the real sketch and a real circuit solver behind it, and the first 15 projects are free with no account.

Common questions

Do I need a resistor with a button?

Not if you use the built-in pull-up: set the pin to INPUT_PULLUP and the Arduino holds it high for you. With an external 10 kΩ pull-down instead, the wire goes to 5 V and the logic inverts — pick one and be consistent.

Why does the reaction timer use millis() instead of delay()?

Because delay() stops everything, including the reading of the button. millis() gives the time without blocking, so the timer can watch the button the whole time and still work out when the press happened.

How many buttons can a project use?

One per input pin, which is 14 on an Uno — and that is enough for the voting machine, which uses three plus a result button. A keypad would need a different approach entirely.

Related

All the projectsThe complete catalogue The guidesHow the ideas behind these work Arduino projects for beginnersThe board-specific builds Arduino simulator in the browserTry any of these without hardware

Try the full simulator with your class

103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. One licence covers a whole school.