The Riding Unicycle: a little rider on just one wheel. It pedals along without falling over.
You have put words on the Brick screen before. You wrote SPEED 75 on the Dual Gyro in Lesson 3. Words help, but they are plain. The screen can also draw pictures. When a machine has a face, people get it without being told.
By the end, your unicycle will show a face while it rides. Then you will make it show a new face when the ride ends.
In the real world 5 min
Where you have seen it
A unicycle has one wheel and no handlebars. There is nothing to lean on. Circus acts ride them. Some people ride ones with a motor to work. Those ones balance by themselves.
Unicyclists riding in Frogner Park, Oslo. Photo: Øystein Bjørke / Wikimedia Commons (CC BY-SA 4.0).
Why it is built that way
A bike is long, with two wheels. That helps it stay up. A unicycle touches the ground in one spot only. So the rider must keep their weight right above that spot. They must do it all the time. They must not tip forward, back or sideways.
They do it by moving the wheel. If they start to tip forward, they pedal forward. That brings the wheel back under them. So you cannot ride a unicycle standing still. You balance by moving.
What would go wrong without it
Some machines cannot tell you what they are doing. People do not trust them. Your unicycle will do something quite hard. Someone across the room cannot tell if it is going well.
A face on the screen is not just for fun. It is the fastest way for a machine to tell you how it is doing.
Before you build 1 min
This model has no step-by-step building guide. The video below is not one either. The video shows the finished unicycle working. It shows what you are aiming for. It does not show which beam goes where. Watch it to see the goal. Then build from your teacher’s model. Or build from a photo of a finished one. If you get stuck, ask. You are not missing a page. There is no page.
Try it in the simulator 10 min
This is the Riding Unicycle you just built, on screen. The lesson’s program is already loaded. Press the green ▶ and watch it go.
Come back here as you work through the lesson. Predict first, then run. Load starter program puts the original back. When you hand in Basic or a Challenge, the program here goes with it.
Got the real robot? In Chrome or Edge on a computer, press Connect at the top of the program and choose USB or Bluetooth. After the first time, the USB cable connects by itself when you plug it in. The Brick then runs the same program, and the robot on screen moves with the real one. Press Download (the arrow next to ▶) to save the program on the Brick. Then run it from the Brick’s File Navigation menu, with no computer.
The main concept — the screen can draw 6 min
There are two display blocks. One draws and goes straight on. The other draws and makes the program wait.
Block
What it does
display [Eyes / Neutral v] :: display
Draws a ready-made picture. Then it goes straight on to the next block. The picture stays until something takes its place.
display [Eyes / Neutral v] for (2) seconds :: display
Draws it. Then it makes the program wait for that long. Then it carries on.
clear display :: display
Wipes the screen. Nothing else does.
Open the dropdown in EV3 Classroom. A dropdown is the little list. It opens when you click the arrow. Look at the whole list before you choose. There are eyes, faces, arrows, signs and things. Picking a good one is most of the work. A face that matches the robot tells a story. A face picked for no reason just muddles people.
The screen keeps what you draw on it. The picture does not fade away. It stays until you clear it or draw over it.
with clear display
when program starts
clear display
display Eyes / Neutral
write GATE OPEN at line 7
without it
display Eyes / Neutral
write GATE OPEN at line 7
1lines · cleared1lines · not cleared1run
Cleared: one message, readableNot cleared: 1 messages on line 7
Both Bricks still show whatever was left on the screen when the last run ended.The left program clears its screen. The right one has no clear block, so the old writing stays where it is.Both draw the eyes.Both write this run's message on line 7 — and on the right it lands on top of the message that was already there.Finished. The right-hand screen keeps everything it has ever been told to write.
drawing
Let it loop two or three times. The left screen still reads cleanly; the right one is the same program with one block missing.
▶The display, and one motor on and offHow both of these work. Open it if you are not sure about the display blocks, or starting and stopping a motor.Show meHide
ComponentOutput5 min
The Brick display
The Brick’s screen is a small black-and-white whiteboard. You can wipe it, draw one of the built-in pictures on it, or write your own words at a spot you choose. It is how the robot tells a person what it is doing.
The screen sits above the buttons on the face of the Brick. It is small and black-and-white, so short messages work and long ones do not.
Blocks reference
Block
What it does
clear display :: display
Wipes the screen blank, ready for something new.
display [Eyes / Neutral v] :: display
Draws a built-in picture chosen from a list — eyes, faces, arrows, symbols.
display [Eyes / Neutral v] for (2) seconds :: display
Draws the picture, holds the program for that long, and then carries on. Handy when a face should be seen before anything else happens.
write [Hello] at line (1) :: display
Writes your own text on one of the screen’s eight lines.
write [Hello] at x: (10) y: (40) with font [normal black v] :: display
Writes text at an exact spot instead of a line, and lets you choose the size. Use it when a message has to line up with something else on the screen.
Clear it, or write on top of what is there
The screen has no memory of whose writing is whose. It keeps every mark until something wipes it — including the marks left by the last run. Watch the same program with and without its clear display block.
with clear display
when program starts
clear display
display Eyes / Neutral
write GATE OPEN at line 7
without it
display Eyes / Neutral
write GATE OPEN at line 7
1lines · cleared1lines · not cleared1run
Cleared: one message, readableNot cleared: 1 messages on line 7
Both Bricks still show whatever was left on the screen when the last run ended.The left program clears its screen. The right one has no clear block, so the old writing stays where it is.Both draw the eyes.Both write this run's message on line 7 — and on the right it lands on top of the message that was already there.Finished. The right-hand screen keeps everything it has ever been told to write.
drawing
Let it loop two or three times. The left screen still reads cleanly; the right one is the same program with one block missing.
Both Bricks are told exactly the same thing. The left one wipes the screen first, so line 7 holds one message and reads correctly. The right one never wipes, so each new message is drawn over the last and the words turn into a smudge. This is why a program that seems to display nonsense is usually displaying the truth — several times over.
Where the writing goes
There are two blocks for writing text, and they describe where in two completely different ways. Watch one message move around the screen under both of them.
clear display
write READY at line 1
write READY at x: – y: – with font normal black
the screen is 178 pixels across and 128 down
0x · across0y · down1line
write [READY] at line (1). Line 1 is the top of the screen, hard against the left edge.The same block, with line 4. Same words, three lines further down — the lines are evenly spaced, about ten pixels apart.Line 8 is as far as the line block goes, and that is only part of the way down. The bottom of the screen is out of its reach.So here is the other block: write [READY] at x: (0) y: (0). That has landed in exactly the same place as line 1 — because x: 0 y: 0 IS the top-left corner.x is how far across, from the left. x: 90 moves it towards the middle.y is how far DOWN, from the top. y: 110 is near the bottom — a bigger y means lower, and that is the one that catches everybody.Finished. Two blocks, two ways of saying where — and one of them can reach the whole screen.
line 1
The arrows are the two numbers. The one along the top is x; the one down the side is y, and it counts downwards from the top edge.
Writing on a line
write [EV3] at line (1) is the simple one. You give it a line number and it puts the text there, starting hard against the left edge — you do not choose how far across, only how far down.
Line 1 is the top. The numbers count downwards, so line 2 is below line 1, not above it.
There are eight of them, each about ten pixels lower than the last. That means all eight sit in the upper part of the screen and the line block cannot reach the bottom at all.
One message per line. Two messages sent to the same line land on top of each other and turn into a smudge — put them on different lines, or clear the screen in between.
For most robots this is all you need: a status word on line 1, a reading on line 3, a warning on line 5. Pick your lines at the start and keep each one for one job, the way you would keep one colour of status light for one meaning.
Writing at x and y
write [EV3] at x: () y: () with font [] treats the screen as a grid of pixels — 178 across and 128 down — and lets you put the text anywhere on it.
x is how far across, from the left edge. x: 0 is the far left; x: 177 is the far right. Bigger x moves right, which is what everybody expects.
y is how far down, from the top edge. y: 0 is the very top; y: 127 is the bottom. Bigger y means lower — this is the one that catches people out, because on a graph at school a bigger y means higher.
The corner is 0, 0. x: 0 y: 0 is the top-left, and it puts the text in exactly the same place as at line 1 — the two blocks are describing the same screen.
The pair of numbers is the top-left corner of the text, not its middle. The letters go down and to the right from the point you name.
The block ends with a font dropdown, and normal black is the usual choice. A larger font makes the writing easier to read from across the room but takes more room across the screen, so fewer characters fit before the text runs off the edge.
Which one to use
Use lines for ordinary status messages — quick to write, impossible to get wrong, and eight of them is plenty for one robot.
Use x and y when the position itself matters: putting a label and its number side by side, lining a heading up over a reading, filling the lower part of the screen, or moving something across the screen as a value changes.
Putting a number on the screen
The text slot of either block will take a reporter, so a sensor value can be shown directly: drop (4 distance in cm) into the slot and the screen shows the reading. That is the EV3’s version of a print statement, and it is the fastest way to find out what a robot actually thinks it is seeing.
A bare number on its own is hard to read, though. To show DIST: 23 rather than 23, use the operator block join [DIST: ] () to glue the label to the value, and put the join into the write block’s text slot.
when program starts :: events hat
clear display :: display
forever
write (join [DIST: ] ([4 v] distance in [cm v] :: sensors)) at line (1) :: display
end
Note the forever: a value written once is a value from the start of the program. To watch a reading change, the write block has to be inside a loop.
Advanced — a dashboard, not a number
Once one value is on the screen the rest follows, and the useful trick throughout is join: it glues two pieces of text together and hands the result to the write block. Anything that reports a value can go in either slot — a variable, a sensor, or another join.
A variable with a label on it
Counting is the classic case. A variable counts how many times the Touch Sensor has been pressed, and a bare 5 on the screen tells nobody anything — PRESSED: 5 tells them everything:
when program starts :: events hat
clear display :: display
set [count v] to (0) :: variables
forever
wait until <[1 v] is pressed? :: sensors>
change [count v] by (1) :: variables
write (join [PRESSED: ] (count)) at line (1) :: display
wait until <not <[1 v] is pressed? :: sensors>>
end
The two wait until blocks are what make it count presses rather than counting as fast as the loop runs while your finger is down. That is the Touch Sensor’s own lesson, but it shows up here because a counter on the screen is where you first notice it going wrong.
Several sensors, one line each
Give every reading its own line and keep it. A line that changes meaning halfway through a program is unreadable at a glance, which is the only speed a screen on a moving robot gets read at.
when program starts :: events hat
clear display :: display
forever
write (join [DIST: ] ([4 v] distance in [cm v] :: sensors)) at line (2) :: display
write (join [DEG: ] ([A v] degrees counted :: sensors)) at line (5) :: display
end
degrees counted is worth putting on the screen the first time you use it — it is the fastest way to find out whether a motor is turning as far as you think it is, and it is the block behind every “why did it stop early” question.
Turning a number into a word
Sensors report numbers, and people read words. The Colour Sensor reports 5; the person watching wants RED. A chain of if … then … else blocks does the translation, and it is worth doing once into a variable rather than in every write block:
if <([3 v] color :: sensors) = (5)> then
set [name v] to [RED] :: variables
else
if <([3 v] color :: sensors) = (4)> then
set [name v] to [YELLOW] :: variables
else
set [name v] to [OTHER] :: variables
end
end
write (join [COLOR: ] (name)) at line (4) :: display
The same shape turns a distance into a warning. Here the screen carries the number and what the number means, which is what lets somebody across the room tell whether the robot is about to hit something:
if <([4 v] distance in [cm v] :: sensors) < (10)> then
set [status v] to [TOO CLOSE!] :: variables
else
if <([4 v] distance in [cm v] :: sensors) < (30)> then
set [status v] to [OBSTACLE FOUND] :: variables
else
set [status v] to [NOTHING FOUND] :: variables
end
end
write (status) at line (3) :: display
Drive all four of those at once below. The screen is the real thing — five write blocks, five lines, and every one of them a join.
Drive the sensors and read the screen. Every line is one write block with a join in its text slot.
24 cm
180°
Colour Sensor5 → RED
Touch Sensor3 presses
Line
What goes in the write block
On the screen now
1
join "PRESSED: " (count)
PRESSED: 3
2
join "DIST: " (4 distance in cm)
DIST: 24
3
(status) — set by the if chain
OBSTACLE FOUND
4
join "COLOR: " (name)
COLOR: RED
5
join "DEG: " (A degrees counted)
DEG: 180
Line 4 says COLOR: RED, but the sensor only ever said 5. The if chain in between is what turns a number into a word.
Advanced — stopping the screen from flickering
The moment a reading goes inside a loop, one of two things goes wrong, and which one depends on where the clear display block went.
Almost everybody tries clear inside the loop first. It gives the right text — and a screen that blinks several times a second, because between the clear and the write there is genuinely nothing on the screen and the loop goes round faster than your eye.
So the clear gets moved to the start of the program, the blinking stops, and the words go wrong. Writing text paints only the characters it has and leaves everything past them exactly where it was. Write RED over YELLOW and the LOW is still there: the screen says REDLOW. Go the other way — yellow first, then red — and it looks fine, which is why this bug takes so long to pin down.
when program starts :: events hat
clear display :: display
forever
write (name) at line (3) :: display
end
YELLOWwhat the sensor says—what the screen says0characters left behind
never blankleftovers survive
The Colour Sensor reads a colour and the name goes on line 3, over and over, inside a forever loop.Rock steady, and wrong. Writing paints only the characters it has, so the tail of the longer word before it is still sitting there.Nothing is misspelled and nothing is broken. Every red character is the tail of a longer word that was never wiped — RED over YELLOW reads REDLOW.Finished. Three programs, one screen, and only one of them is both steady and right.
waiting
Watch the bottom three rows rather than the Brick. They are what the screen is actually doing: old characters, new characters, and whatever survives.
The fix is to make the new text at least as long as the old one, and join already does that: pad it with spaces. RED plus three spaces is six characters — exactly enough to paint over YELLOW. Nothing is left behind, and nothing is ever blank.
write (join (name) [ ]) at line (3) :: display
Pad to the length of the longest thing that line can ever show. Six characters covers RED, BLUE and GREEN but not NOTHING FOUND — count the longest message, and add spaces to match. The same applies to numbers: DIST: 5 after DIST: 40 leaves a stray 0 on the end, so a line that shows a two-digit reading needs a trailing space.
Use clear-inside-the-loop when the whole screen changes at once and a flicker does not matter; use the padding trick whenever a value is being watched.
Advanced — a whole list on the screen
Once several values need showing, the line number becomes a counter and the values come out of a list: write item 1 at line 1, item 2 at line 2, and so on inside a repeat. That needs the list blocks rather than the display blocks, so it lives with them — Lists covers building one and reading it back item by item, and the loop that walks it is the same loop that fills the screen.
Why it matters
Machines in the real world tell you what they are doing: a microwave counts down, a lift shows its floor, a car dashboard warns you. A robot that shows WAITING and then OPEN is far easier to understand — and far easier to debug — than one that moves silently.
ComponentMotion4 min
One motor, on and off
Everything an EV3 does begins with a motor turning. Before worrying about how far or how fast, there are only two things to say to a motor: start and stop. The blocks are the same whichever motor you use — only the port letter changes.
Blocks reference
Block
What it does
[A v] start motor [clockwise v] :: motors
Starts the motor and immediately carries on to the next block. The motor keeps turning on its own.
[A v] stop motor :: motors
Stops the motor.
wait (2) seconds
Holds the program here, which is how you control how long a motor runs.
Start, wait, stop
Because start motor does not wait, a motor started on its own would run until the program ended. The pattern that gives a motor a length is three blocks:
when program starts :: events hat
[A v] start motor [clockwise v] :: motors
wait (2) seconds
[A v] stop motor :: motors
Read it aloud: start it, leave it two seconds, stop it. Change the wait and you change how far the motor gets.
Watch it run
The highlight below follows the block the Brick is running, and the shaft turns only while the program is between start motor and stop motor. Notice that the count keeps climbing all the way through the wait — the wait does not pause the motor, it pauses the program.
when program starts
A start motor clockwise
wait 2 seconds
A stop motor
Medium · frontturning: the red hub and its crossLarge · sideturning: the red hub, pin holes and cross
0.00rotations so farnoshaft turning
The program begins. Both motors are still.The motor is told to start — and the program does not wait for it.The program is paused at the wait block. The motors are not: watch the count keep climbing.The motor is told to stop. The shafts stop wherever they had got to.Finished. The motor ran for about two seconds and stopped where it stopped.
motor stopped
The count does not pause when the program does. A wait holds up the blocks, and the motor carries on turning underneath it.
This is the whole idea behind start motor: it hands the motor its instruction and moves on, leaving the motor running behind it. Nothing stops the shaft until a block tells it to.
Which way is clockwise?
The direction dropdown says clockwise or counterclockwise — but clockwise seen from where? Always from the axle end: look straight at the shaft coming towards you, and clockwise is the way a clock’s hands go.
On the Medium Motor
Here the Medium Motor faces you, so its output axle points straight out of the page. This is the view to picture when you are choosing a direction.
The Medium Motor from the front, axle towards you. Choosing clockwise turns the axle the way the blue arrow goes; counterclockwise turns it the way the orange arrow goes. Everything geared to that axle follows it.
when program starts :: events hat
[A v] start motor [clockwise v] :: motors
wait (2) seconds
[A v] stop motor :: motors
A Medium Motor normally lives in port A or D.
On the Large Motor
The Large Motor is shown from the side, which is the face its axle comes out of — so once again you are looking straight down the shaft.
The Large Motor from the side, hub towards you. The same block with the same dropdown turns this hub the same way — the only thing that has changed is the port letter.
when program starts :: events hat
[B v] start motor [clockwise v] :: motors
wait (2) seconds
[B v] stop motor :: motors
A Large Motor normally lives in port B or C. Compare the two programs: they are the same three blocks, and only A has become B.
Same blocks, different motor
Medium · port A
Large · port B
Both motors take exactly the same start and stop blocks. The Large Motor is bigger and pushes harder but turns more slowly; the Medium Motor is quicker and lighter. Choosing between them is a build decision, not a programming one.
Why it matters
A fan, a conveyor belt or a spinning ride does not need to stop at an exact position — it just needs to run while something is happening. For those, timing the motor is simpler and perfectly good enough.
Say this back before moving on: “What I draw on the screen stays there. If I want it gone, I have to clear it or draw something else.”
What’s in this build 4 min
Find the parts with cables. There is a Brick and one motor. You must work out which motor it is. This model has no parts list.
Large Motor
Medium Motor
Which one is in your build? The Large Motor is longer. It has air slots down the side. The Medium Motor is shorter and more square. Its axle comes out of the flat front.
Where the weight sits
This model stands on one wheel. Its weight must be right above that wheel, or it falls over. The Brick is the heaviest part in your kit. So where the Brick sits sets the balance.
Stand the model on its wheel and let go. Which way does it go? Forward, backward, or sideways?
It falls towards the side with too much weight. Move the Brick a little the other way. Then try again.
Keep going until it stands by itself for a second or two. Write down what you had to move.
Do this before you program anything. A badly balanced unicycle falls over every time. The program cannot fix it. You would spend the whole lesson fixing blocks. But the real problem is the build.
Ports — and the rule 4 min
Sensors go in ports 1, 2, 3, 4. Motors go in ports A, B, C, D. You cannot swap them. If you do, nothing warns you. The robot just will not work.
Part
Port
Why this one
The motor (drives the wheel)
A
When there is only one motor, it usually goes in A. Every program on this page says A. Is yours in another port? Then move the cable, or change every block. Do one or the other, not a bit of both.
The screen
none
It is part of the Brick, like the speaker in Lesson 2. There is nothing to plug in.
Check your own build now:
Motor cable in port A. That is a letter, not a number.
Turn the wheel by hand. Does it turn freely?
Is the screen facing out? People watching need to see it. A face nobody can see is no help.
Does the cable pull the model off balance? Tuck it in. Then it sits over the wheel too.
Connect the Brick 4 min
Two routes, and either is fine. USB is the reliable one and the one to fall back on when a room’s Bluetooth is busy; Bluetooth leaves the robot free to move, which some models need.
▶How to connect the BrickUSB and Bluetooth, step by step, with a photograph of every screen. Open it if you have not done this before — or if pairing is not working.Show meHide
USB — the reliable one
Switch the Brick on with the dark grey centre button.
Cable into the Brick’s PC port — the small square socket beside the numbered ports, not one of the numbered ones.
Other end into the computer.
Bluetooth — name it first
Do these in order. Naming the Brick after you go looking for it in the list is how groups end up driving each other’s robots.
Name your Brick. On the Brick: Settings (the spanner) → Brick Name. Type something nobody else will pick, then press the tick. Every Brick is called EV3 until somebody changes it.
Turn Bluetooth on. Settings → Bluetooth. Tick Bluetooth and Visibility. Leave iPhone/iPad/iPod unticked.
Connect from EV3 Classroom. Click the Brick icon at the top of the programming area, find your Brick by name, and click Connect.
Say yes on the Brick. It asks “Connect?” with the computer’s name — choose the tick, then accept the passkey, which is already 1234.
Where to read it. The name sits in the bar across the very top of the screen, on every screen — so you can check which Brick you are holding at any moment without going into a menu. This one is EV3VE. A Brick nobody has renamed says EV3.Step 3, and the reason step 1 exists. Three Bricks in range — read the name before you click Connect. Pairing with the wrong one is not an error: it works perfectly, on somebody else’s robot.
Step 2.Bluetooth switches the radio on; Visibility is what lets the computer find you. With Visibility off your Brick works perfectly and simply never appears in the list.Step 4. Look at the Brick. It asks whether to accept and names the computer. Choose the tick.Then the passkey, already 1234. Press the tick again and you are connected.
The two failures, every class, every time. The Brick has gone to sleep while you were building — press the centre button to wake it. Or you have paired with the group at the next table, which is why the name matters.
The long version, including Port View and how to read the port tiles, is in the Brick & Bluetooth guide.
Use Bluetooth if you can. This model balances on one wheel. A USB cable hanging off it will pull it over. Then you will think the balance is wrong. With this build, the cable really does matter.
Confirm the connection 2 min
Check the Brick icon: connected, or not.
Check the port tiles. A motor on A, and nothing anywhere else.
Look at which kind of motor the tile shows. Is it the one you chose in section 5?
Turn the wheel by hand. Watch degrees counted move.
Does the number stay the same when the wheel turns? Stop here. The cable is in the wrong port. Or it is not pushed all the way in.
Change it and test 8 min
Change one thing at a time, and predict before each run. Predict means guess what will happen.
Add a second display block after stop motor, with a new picture. Predict what the screen will show at the end. For how long?
Now delete the clear display at the top. Run it twice in a row. The old face is still there before the new one shows. For a moment, the robot is showing you the last run.
Swap the first display block for the … for (2) seconds version. Predict: will the wheel start sooner or later than before? This block makes the program wait. So every block below it waits too.
Raise the speed to 70 %. Does it go further before it wobbles, or less far? When it falls, watch which way it is facing.
Step 2 tricks people all year. A screen remembers. Sometimes the screen does not match what the robot is doing. First check for an old message. Do not blame a broken sensor straight away.
Does it fall over every time, whatever you try? Stop coding. Go back to the balance. Move the Brick one stud at a time. Check the cable is not hanging off one side. Almost every unicycle problem is a weight problem.
This is what you are building: the Riding Unicycle.
Build it 15 min
Build the model before you read any further. Everything after this is about making it do something, and none of it will make much sense with nothing on the table in front of you.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
Check the finished build against the picture before you switch anything on. A motor mounted the wrong way round is far easier to spot now than it is to debug later, when it looks like a program fault.
Make it move 10 min
Set the motor speed to 20%
When Up button is pressed, motor will turn clockwise.
When Down button is pressed, motor will turn counterclockwise.
When Center button is pressed, motor will be stop.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
Challenges 27 min
Work through them in order — each is harder than the last. The extra challenge comes after all three, and it is meant to make you plan before you build.
Challenge 1
Set the motor speed to 20%
1. When Up button is pressed, play a sound "okey-dokey", motor will turn clockwise.
2. When Down button is pressed, play a sound "bravo", motor will turn counterclockwise.
3. When Center button is pressed, play a sound "Information/Activate", motor will be stop.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
Challenge 2
- When Up button is pressed, speed increases by 5, display the new speed.
- When Down button is pressed, speed decreases by 5, display the new speed.
- The motor speed must stay between 0% and 100% (it should not go above 100 or below 0).
- Press the left button, the motor turns clockwise at the set speed; press center button, motor will stop.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
Challenge 3
Set the initial speed to 0
1. When the center button is pressed, the motor will turn clockwise and increase the speed by 10 for every 1 second and update the motor speed on the display.
2. Stop the loop once speed exceeds 100%.
3. Play a countdown sequence ("Three", "Two", "One"), stop motor and exit the program.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
Extra challenge
Make a machine that tells people how it is doing.
Your unicycle must ride a distance you choose. No one may touch it. It must use its screen to tell what happened. That counts when things go wrong too. If it gets to the end, it should say so. If it gets stuck or is stopped early, it should say that. It must not use the same face for both.
Plan on paper before you build. What can your program really know about how the ride went? How could it tell a finished ride from a stopped one? Use only what you have learned so far.
You will be asked two questions when you show it. What can your robot really tell about its own ride? What is it only guessing? And why is a wrong report worse than no report at all?