Learning Goals 5 min
By the end of this lesson you will be able to:
- Point to and name five parts of an Arduino UNO board you are holding in your hand: USB port, power jack, microcontroller chip, digital pins and analog pins.
- Explain in one sentence the difference between a microcontroller and a regular computer.
- Identify at least three everyday devices that contain a microcontroller and describe the one job each microcontroller does.
Warm-Up 10 min
This is our very first lesson, so there is nothing to recap. Instead, take a guess at this:
Quick-fire puzzle
Below is a tiny Arduino program. Read it carefully — what do you think it makes the board do?
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}Reveal the answer
The small orange LED on the board, labelled L, lights up for one second, switches off for one second, then repeats forever. This program is called Blink, and it is the "Hello, world!" of Arduino.
New Concept 20 min
The big idea — a tiny brain in a box
A regular computer is like a giant brain that can do hundreds of things at once: browse the internet, play videos, run games. An Arduino is a much smaller brain called a microcontroller, designed to do one focused job really well — like the chip inside your microwave that worries only about cooking.
Arduino is two things at the same time:
- The board — a piece of hardware that holds a microcontroller chip and the wiring around it.
- The software — a free program called the Arduino IDE that you use to write code and send it onto the board.
Tour of the Arduino UNO
Hold an Arduino UNO. Find each of these parts:
| Part | Where on the board | What it does |
|---|---|---|
| USB port | Top-left corner | Connects to your computer for power and to upload code. |
| Power jack | Below the USB port | Lets you power the board from a 9V battery or a wall adapter. |
| Microcontroller chip | Black rectangle near the centre, labelled ATmega328P | The actual brain — it runs your code. |
| Digital pins (0–13) | Black header on the top edge | Pins you can switch on or off, or read as on/off. |
| Analog pins (A0–A5) | Black header on the bottom-right | Pins that can read smooth voltages from sensors. |
| Power pins (5V, 3.3V, GND) | Black header on the bottom-left | Where you take power for the things you wire up. |
| Onboard LED (L) | Small orange LED near pin 13 | A built-in light wired to pin 13 — great for testing. |
| Reset button | Small button next to the USB port | Restarts your sketch from the beginning. |
What a sketch looks like
An Arduino program is called a sketch. Every sketch has exactly two parts:
void setup() {
// runs ONCE when the board powers on
}
void loop() {
// runs OVER and OVER, forever
}That is it. setup() is for things you do once, like telling a pin to be an output. loop() is the bit that keeps running until you cut the power.
Why it matters
Microcontrollers are everywhere — your microwave, your washing machine, your car's seatbelt warning, smart light bulbs, fitness trackers, the buttons in a lift. Learning Arduino is learning the language used by billions of tiny machines hiding inside everyday life.
Worked Example 20 min
Here is a complete sketch — the same Blink program from the warm-up, but properly laid out and commented. You will upload this for real in the next lesson; for now, read every line and predict what each one does.
// Blink — the "Hello, world!" of Arduino
// Makes the onboard LED on pin 13 flash once per second.
const int LED_PIN = 13; // store the pin number in a named constant
void setup() {
pinMode(LED_PIN, OUTPUT); // tell the board pin 13 is an output
}
void loop() {
digitalWrite(LED_PIN, HIGH); // turn the LED ON
delay(1000); // wait 1000 ms (1 second)
digitalWrite(LED_PIN, LOW); // turn the LED OFF
delay(1000); // wait another second
}
// → onboard LED blinks once per second, foreverWalk through the sketch with your teacher and answer these out loud:
- Which line runs only once, and which lines run again and again?
- What does
HIGHmean? What doesLOWmean? - Why do we use
const int LED_PIN = 13;instead of just typing13everywhere?
Try It Yourself 20 min
For each task, copy the starter sketch onto paper or into the IDE preview, then write the change. Don't worry about uploading yet — predicting is the skill we're practising today.
Goal: Change the starter sketch so the LED blinks five times faster.
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}Goal: Change the sketch so the LED stays on for 2 seconds and then off for half a second.
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(____);
digitalWrite(13, LOW);
delay(____);
}Goal: Write a sketch that blinks the LED in Morse code SOS — three short flashes, three long flashes, three short flashes, then a long pause before repeating.
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
// your SOS pattern here
}Mini-Challenge 15 min
Design a smarter everyday object
Pick any boring everyday object — a toaster, a fridge magnet, a water bottle, a backpack. On a sheet of paper, design how a microcontroller could give it one new useful job.
Your design must include:
- A name and a one-sentence "one job" for the device.
- At least three inputs it would read (buttons, sensors, switches).
- At least two outputs it would control (LEDs, buzzer, motor, screen).
- A rough sketch showing where the Arduino sits inside the object.
It works if a classmate can read your drawing and explain back to you what your invention does and why.
Recap 5 min
An Arduino is a tiny computer called a microcontroller that lives on a board the size of a credit card. You write code in the Arduino IDE, send it onto the board, and the chip runs that code over and over — making the physical world react to you.
- Microcontroller
- A small chip that runs one focused program. Found in microwaves, washing machines, toys.
- Arduino UNO
- The most common Arduino board, built around the ATmega328P microcontroller.
- Sketch
- The name for an Arduino program. Every sketch has a
setup()and aloop(). - IDE
- Short for Integrated Development Environment — the app you write and upload Arduino code in.
Homework 5 min
Microcontroller hunt. Around your home, find five different devices you think contain a microcontroller. For each one, write down:
- The name of the device.
- The "one job" you think its microcontroller does.
- One input it must read (a button, a sensor, a dial).
- One output it must control (a light, a sound, a motor, a screen).
Bring back next class: your filled-in list on a single sheet of paper, ready to share with the group.