This lesson guides students through writing their very first real Arduino program. Blink is the classic starting point for all new coders because it shows, in the simplest possible way, how code flows from the computer into the Arduino and then becomes action in the physical world.

Students learn how to read Arduino C syntax, understand variables, use setup and loop, and control a digital pin using commands like pinMode, digitalWrite, and delay. The goal is not to turn students into expert programmers today. The goal is to help them feel confident, capable, and excited to continue exploring.


Student Learning Goals

By the end of this lesson students will be able to
• Type a simple Arduino sketch
• Understand what variables are and why they matter
• Explain what setup and loop do
• Use pinMode to configure a pin
• Use digitalWrite to turn a pin on and off
• Use delay to control timing
• Upload a program and watch the Arduino respond
• Feel proud of writing their first working code


Materials Needed

Arduino Uno boards
USB cables
Computers with Arduino IDE
Printed Blink reference sheet (optional)
Nonmetal tabletop or protective mats
Student notebooks


Teacher Preparation Notes

Please open the Blink example on your own computer before class so you can preview the structure.
Make sure all boards are connected safely and recognized by the IDE.
Move slowly. This is many students’ first real coding experience, and your tone matters more than the technical details.
Keep reminding students
You don’t have to remember everything today. You just have to try.


Safety Notes

Only handle the Arduino on safe surfaces.
Keep drinks away from electronics.
Do not touch exposed pins to metal surfaces.
Students remain seated when working with connected electronics.


Warm Up Activity

Ask students
What do you think code actually looks like
Let them guess anything. Then show the simple Blink code on the board.

Explain that today they will learn what each piece means and make an LED blink using their own typed program.


Lesson Flow


**Step One

You Are Not Alone**
Show the slide reminding students that every answer is available online.
Explain that even professional programmers look things up constantly.

Teacher reassurance
You don’t have to memorize anything. Coding is about exploring and asking questions.


**Step Two

Look at the Blink Code**
Show the basic Blink example
variable
setup
loop
pinMode
digitalWrite
delay

Explain that this is the whole program they will learn to write.


**Step Three

Comments and Color Coding**
Show the slide about comments.
Explain
Double slashes are notes for humans
They do not run
They help future you remember what you were thinking

Point out the color coding
Green = comments
Orange = commands
Light blue = functions
Black = regular code
Red or yellow = warnings or errors

Teacher note
Tell students the colors are there to help them. They are not decoration.


**Step Four

Brackets and Structure**
Show the slide explaining parentheses, curly braces, brackets, and chevrons.

Explain that curly braces hold blocks of code.
You can compare them to “bookends” that group instructions together.


**Step Five

Start Writing the Code**
Have students open
File
Examples
Basics
BareMinimum

Show them where to type
int led = 13;

Explain
A variable stores information
int means “integer number”
led is the name we chose
13 is the pin the LED is attached to

Teacher reassurance
Case matters in C. Small things like missing letters happen to everyone. Mistakes are normal.


**Step Six

Understanding setup()**
Show the slide illustrating setup.
Explain
setup runs once
It prepares the Arduino for what we want it to do

Type together
pinMode(led, OUTPUT);

Explain
pinMode tells the Arduino whether a pin is sending out information or receiving it.
Here we set pin 13 as an OUTPUT.


**Step Seven

Understanding loop()**
Move to the loop section.
Explain
loop runs forever
It repeats everything inside it as long as the Arduino has power

This is where the action happens.


**Step Eight

Writing the Blink Actions**
Guide students through typing
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);

Explain in gentle language
digitalWrite flips the switch on that pin
HIGH means on
LOW means off
delay pauses the program for the number of milliseconds given
1000 milliseconds = 1 second

Teacher note
Encourage students to read it like a story
Turn the light on
Wait
Turn the light off
Wait


**Step Nine

Upload and Celebrate**
Make sure Arduinos are connected.
Have students click upload.

Tell them to watch the TX and RX LEDs blink.
Then watch their pin 13 LED flash on and off.

Celebrate
You just made your first program run on real hardware.


**Step Ten

Try Changing the Timing**
Show the slide asking what happens if delay(1000) becomes delay(5000).

Let students experiment
Make the blink faster
Make it slower
Change both delays to different values

This reinforces how timing works.


Teacher Notes for Each Slide

Moon landing slide
Use this to reassure students that coding is teamwork and always supported.

Syntax definition
Help students understand it simply as “how the code is written.”

BareMinimum slide
This helps them see where everything goes.

Variable slides
Explain slowly that variables are containers for values.

Functions and braces
Make it visual and simple.

digitalWrite and delay slides
Let students touch the Arduino while it blinks.

Congratulations slides
Use these moments to build confidence.


Independent or Group Activity

Option A
Rewrite the Blink code by hand

Students copy the program into their notebook with labeled parts.

Option B
Create a rhythm blink

Students use different delays
200
800
1500
to make patterns like
flash flash pause flash

Option C
“Explain like a storyteller”

Students describe in regular words what their Arduino is doing.


Vocabulary and Concepts

Variable
A container that holds information.

Function
A block of code that performs an action.

setup()
Runs once when the Arduino starts.

loop()
Repeats forever while the Arduino is powered.

pinMode
Tells the Arduino how a pin should behave.

digitalWrite
Turns a pin on or off.

delay
Pauses the program for a set number of milliseconds.


Wrap Up

Ask students
What was the most surprising part of writing Blink
How did it feel to make something happen on real hardware
What would you change if you wanted the LED to blink in a pattern

Let them share their discoveries.


Exit Ticket

One
What does digitalWrite do
Two
What does delay(1000) mean


Quiz

1. Multiple Choice
What does setup() do
Runs forever
Runs once at the start
Turns a pin on

2. Short Answer
What does int led = 13 mean

3. Multiple Choice
HIGH means
Off
On
Repeat

4. Short Answer
Why do we use delay

5. Short Answer
Name one thing you changed to experiment with Blink.


Teacher Reflection

Did students type confidently or need more guidance
Did the class stay calm when errors appeared
Were students excited seeing the LED blink
Do we need to slow down syntax explanations next time