Today you will make a tiny light on a real Arduino blink in a pattern that you choose. This first win proves that your computer can send instructions to the board, then lets you change those instructions and watch the board obey.
We are not using a breadboard yet on purpose. A first project should have only one new challenge—telling the board what to do—not a cable problem, loose wire, and new code all at once.
At a glance
| Age range | 10–13 |
|---|---|
| Time | 25–35 minutes |
| Parent involvement | Medium for setup; light during the build |
| Concepts | Code upload, digital output, variables, setup(), loop(), timing |
What you will learn
- Connect an Arduino Uno and upload a program.
- Use a program to turn a physical light on and off.
- Explain what
setup()andloop()do. - Change a number in code and observe the physical result.
- Make a prediction, test it, and use the result as evidence.
Before you begin
Ask a parent to complete the course introduction and setup. You need a genuine Arduino Uno, its supplied USB-A-to-USB-B data cable, Arduino IDE 2, and optionally a notebook. The breadboard stays empty today.
- Use only USB power; do not connect batteries or wall power.
- Keep drinks away and hold the board by its edges.
- An adult may help with software, permissions, or selecting the port. The student should upload, predict, change, and explain.
Build the beacon
1. Find the built-in light
- Put the Uno on a dry table.
- Find the small LED labeled L, near the number 13.
- Connect the supplied USB cable directly to the computer.
Checkpoint: the green power LED lights. If not, check power and cable first.
2. Choose the board and port
- Open Arduino IDE 2.
- Choose Arduino Uno in the board selector.
- Choose the port. It often begins
/dev/cu.usbmodemon Mac or resemblesCOM3 (Arduino Uno)on Windows. - Install Arduino AVR Boards if prompted.
Checkpoint: the IDE names both Arduino Uno and a port. If no port appears, unplug and reconnect and observe which entry appears.
3. Upload the program
- Choose File → New Sketch and replace the starter text with the code below.
- Click the checkmark to verify, then the right-arrow Upload button.
- Wait for Done uploading.
Checkpoint: the L LED turns on for half a second, off for half a second, and repeats.
Code
const int STATUS_LED = LED_BUILTIN;
void setup() {
pinMode(STATUS_LED, OUTPUT);
}
void loop() {
digitalWrite(STATUS_LED, HIGH);
delay(500);
digitalWrite(STATUS_LED, LOW);
delay(500);
}STATUS_LED names the built-in LED pin. setup() runs once and prepares it as an output. loop() repeats forever. digitalWrite() sends HIGH (on) or LOW (off), and delay() pauses in milliseconds.
Predict and change
Before editing, predict what happens when both 500 values become 100. Upload and watch. Then try 1000. One thousand milliseconds is one second.
Required challenge: three-flash distress beacon
Make three quick flashes, then a long pause, and repeat. Keep using STATUS_LED, HIGH, LOW, and delay(). Draw a timeline—on, off, on, off, on, off, long wait—and upload after each small edit.
Parent guidance: let the student attempt the first two flashes before offering a hint. If stuck, point to the last delay() and ask, “Which wait happens after the third flash?”
Understand it
- Why does
pinMode()come beforedigitalWrite()? - What happens if the first delay becomes 2000 but the second stays 500?
- Why does the beacon repeat with only one HIGH line?
- What happens if the LOW line is removed?
- Why begin with the built-in LED?
Optional: make a heartbeat pattern, invent Morse-like initials, or design patterns for a robot that is ready, worried, or celebrating.
Debugging guide
| What you notice | Smallest next test |
|---|---|
| No green LED | Reseat both cable ends and connect directly. |
| No port | Use the supplied cable; unplug/replug and note what appears. |
| Missing FQBN | Select Arduino Uno and install Arduino AVR Boards. |
| Cannot open port | Close Serial Monitor, reconnect, and select the reappearing port. |
| Upload succeeds; no blink | Upload this exact code with both delays at 1000. |
| LED stays on | Confirm a LOW line follows HIGH and inspect both delays. |
| Red error text | Read the first error and compare that line and the one above. |
Show what you learned
You used setup() to prepare a job, loop() to repeat it, digitalWrite() to change an output, and delay() to control timing. Record what you changed, what failed, how you diagnosed it, and explain either loop() or STATUS_LED in your own words.
Build a Push-to-Shine Arduino Light
Parent guide
- Prepare only the Uno, cable, notebook, and a dry work surface.
- Let the child choose timing, press Upload, design the pattern, and explain it.
- Resist taking over for a typo, a misplaced delay, or an imperfect safe pattern.
- Step in for detection, permission, cable, or sustained-frustration problems.
Ask: “Point to the line that turns the LED on. Point to the line that makes it repeat. How would you make it wait longer after the third flash?” Award points for a tested build, correct explanation, deliberate change, and useful notebook note.