Learning Goals 3 min
By the end of this lesson you will be able to:
- Build the walking Stegosaurus with its Medium Motor in port A.
- Make it take a set number of steps by running the motor a fixed amount.
- Play a footstep note for each step, in time with the legs, using play beep (60) for (0.3) seconds.
Meet the Model — the Stegosaurus 6 min
What is a Stegosaurus?
Stegosaurus was a large plant-eating dinosaur that lived about 150 million years ago. It walked slowly on four legs and carried a row of tall bony plates down its back. A pair of spikes stuck out from its tail.

The science behind it
Stegosaurus was a herbivore — it ate only plants. It lived in the late Jurassic period, around 150 million years ago. The row of bony plates along its back may have helped it cool down or warn off rivals. The tail spikes were a weapon against predators.
Where you meet it
You meet Stegosaurus in natural-history museums, where its skeleton is a favourite. It also stars in dinosaur films, books and toys.
What we'll build
We'll build a walking Stegosaurus. One Medium Motor on port A drives its legs so it steps forward. Then we play a footstep note in time with each step.
Warm-Up 4 min
The Stegosaurus walks when one motor turns its legs. One full turn of the motor is about one step cycle.
Quick-fire puzzle
Priya runs this. What does the dinosaur do, and what do you hear?
when program starts :: events hat play beep (50) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors play beep (50) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors
Reveal the answer
You hear a low thud-like note, then the dino takes a step; another note, another step. The note plays before each step, so it sounds like a heavy footstep landing. Two steps in total.
New Concept — notes timed to steps 10 min
A note is a musical tone. Low numbers are deep sounds; high numbers are squeaky ones. A short, low note makes a good footstep.
Blocks reference
| Block | Category | What it does |
|---|---|---|
play beep (60) for (0.3) seconds :: sound | Sound | Plays a musical tone for a set time. The number is the pitch — lower is deeper. |
[A v] run [clockwise v] for (1) [rotations v] :: motors | Motors | Turns the legs one step cycle. |
play beep (60) for (0.2) seconds :: sound | Sound | A plain beep, from earlier lessons. |
Pitch — the note number
A small Stegosaurus might squeak with a high note (like 80). A heavy one thuds with a low note (like 45). Pick a pitch that suits the creature.
Why it matters
Games and films add a footstep sound to every step so movement feels real. Timing the sound to the motion is what makes a robot dinosaur believable rather than silent.
Build & Program — the Stegosaurus 17 min
Part A — Build
Build the walking Stegosaurus. One Medium Motor drives a leg linkage that moves the legs forward; the back fins wobble as it walks.
Components & ports: EV3 Brick · Medium Motor → port A.
- Build the body and attach the leg linkage so the legs step as an axle turns.
- Connect the Medium Motor to the leg axle through gears; plug it into port A.
- Clip the row of back fins on top.
- Turn the motor by hand and check the dino takes a clean step each rotation.
Part B — Program
Take three steps, with a deep footstep note before each one.
- Drag in the hat that starts the program:
when program starts :: events hat
- Set a slow, steady walking speed:
[A v] set speed to (45) % :: motors
- Play a deep footstep note:
play beep (45) for (0.3) seconds :: sound
- Take one step:
[A v] run [clockwise v] for (1) [rotations v] :: motors
- Repeat the note + step pair two more times.
when program starts :: events hat [A v] set speed to (45) % :: motors play beep (45) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors play beep (45) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors play beep (45) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors
Expected behaviour: the Stegosaurus thuds and takes a step, three times, walking forward in time with the footstep notes.
Try It Yourself — three small builds 11 min
Goal: A higher, squeakier baby dino. Raise the note pitch to 80.
when program starts :: events hat play beep (80) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors play beep (80) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors
Goal: Footstep after the step instead of before. Does it feel different?
when program starts :: events hat [A v] run [clockwise v] for (1) [rotations v] :: motors play beep (45) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors play beep (45) for (0.3) seconds :: sound
Goal: Arjun wants a two-tone walk: a low note for the left foot and a higher note for the right foot, over four steps.
when program starts :: events hat play beep (45) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors play beep (60) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors play beep (45) for (0.3) seconds :: sound [A v] run [clockwise v] for (1) [rotations v] :: motors
Mini-Challenge — the marching dino 6 min
Combine today's footstep notes with last lesson's idea of timing. Make the dino march forward with a steady note on every step, and a louder play sound "roar" at the very end.
It works if:
- Every step has its own footstep note, all in time.
- A different, bigger sound plays once the dino stops.
Recap 2 min
You played musical notes timed to walking steps. play beep (60) for (0.3) seconds plays a tone — low numbers are deep, high numbers are squeaky. A short note before each step turns motion into a believable footstep.
- play beep (block)
- Plays a musical tone for a set time. The number is the pitch.
- Pitch
- How high or low a sound is. Lower numbers sound deeper.
- Step cycle
- One full turn of the leg motor — roughly one walking step for the model.
Homework 1 min
Design a walk. Choose a pitch that suits your dinosaur and make it walk six steps in time with the notes.
Bring back next class: a short video or a note of which pitch you picked and why.
Heads up for next class: EV3-L1-09 builds the Plesiosaurus and compares the three kinds of sound: beep, sound clip and note.