Challenge 1
Measure how fast you react. Start the watch. Stop it as fast as you can. Do this ten times. Tell us all ten times and your best one. Then do it for everyone in your group. Put the numbers side by side.
Quick Learn — the model, the instructions, the program and the challenges. The theory is in Full Lesson.
EV3 Robotics›Level 1 · Beginner›Lesson 35
Level 1 · Lesson 35 · EV3-L01-3560 minutes · Ages 7+ · Model: Stop Watch · No motor
The Stop Watch: a Touch Sensor with a lever over it. You can slap it with your whole hand. A fingertip is not needed. Press once to start the clock. Press again to stop it.
No motor. Eighteen pages, one sensor, one cable. It is the shortest build in the course. Like the Fencing sword, nothing on it moves by itself.
You met the Brick’s clock on the Stone Grinder in Lesson 20. It timed how long the machine ran. But the machine chose how long to run. So the clock was just checking the program’s own homework.
Today the clock measures something the program cannot know or control. It measures a person.
Round the neck of a PE teacher. At the end of a swimming lane. A stopwatch does one job. It did that job long before computers.

Notice what a stopwatch does not have. It cannot tell when the race starts. It has a button, and a person presses it.
That is the whole idea. The stopwatch is very good at counting hundredths of a second. People are bad at that. But people are good at seeing when the race began. So the stopwatch leaves that job to the person.
Big races now leave the person out. The starting gun is wired to the clock. Pads feel the runners push off. They did that because of what you are about to measure.
A person cannot react at once. You see something. Then your finger moves. In between, about two tenths of a second goes by. A message has to go to your brain, and back out to your hand.
Some 100-metre races are won by a hundredth of a second. Timing by hand is no good for that. The timekeeper is too slow. Their reaction is longer than the gap between first and second. That is not being careless. It is just how fast people are.
When a person measures, the person is part of the result. First, find out by how much.
The same two blocks as Lesson 20. A new job.
| Lesson 20 — the Stone Grinder | Lesson 35 — the Stop Watch | |
|---|---|---|
| What ends the timing | A number in the program | A person |
| Could you predict the answer? | Yes. About 15 seconds. You asked for 15 | No. That is why you measure it. |
| What the reading tells you | That the program did what it said | Something new about the world outside the robot |
The blocks are the same. reset timer starts the count. timer reads the seconds since then. What is new? The number now tells you something. Nobody in the room knows what it will say.
Look at the shape of the program. Wait for a person → start counting → wait for a person → read it. The two waits are the two ends of the measurement. In between, the robot does nothing but count.
Bumped, not pressed. One slap must not start and stop the watch. Use bumped — down and up. Then each whole click counts once. The Timber Saw in Lesson 16 was the same.
A clock on the program is a check. A clock on the world is a measuring tool.
A wait pauses for a length of time. The timer is different: it runs in the background and can be read at any moment, so the robot can know how long something has taken while it is still happening.
| Block | What it does |
|---|---|
(timer) | Reports the seconds since the timer was last reset. |
reset timer | Sets it back to zero, so the next reading counts from here. |
The most valuable use of a timer is escaping a wait that might never end. A robot told to drive until it sees a wall will drive for ever if the wall is not there. Combined with a timer, it can give up:
Repeat until the wall is close or five seconds have passed. That one change turns a program that can hang into one that always finishes. Both robots below are looking for a wall that is not there.
no way out
with a timeout
The sensor is not faulty and the program is not wrong. There is simply no wall, and only one of these two programs has a way of noticing that.
The left-hand robot is not broken, and neither is its sensor. Its condition is simply one that will never come true, so the program sits on that block for ever — with nothing on the Brick to say so. The right-hand program asks the same question with an escape route bolted on, and finishes every time.
Real systems time themselves out constantly — a lift that cannot close its doors eventually gives up and beeps rather than trying for ever. A robot with no timeout simply stops responding, and there is nothing on screen to say why.
The Touch Sensor is the simplest input the EV3 has: a button that is either pressed or not. That sounds trivial, but it is how a robot knows it has hit a wall, reached the end of a track, or been told to start by a person.
| Block | What it does |
|---|---|
wait until <[1 v] is pressed? :: sensors> | Holds the program here until somebody presses the sensor. |
<[1 v] is pressed? :: sensors> | Reports true or false. Drop it into a condition to make a decision rather than a wait. |
[1 v] when [bumped v] :: events hat | Starts a whole stack of its own. The dropdown chooses the moment: pressed, released or bumped. |
A button is not only “pressed”. One press is three things: the moment it goes down, the time it stays down, and the moment it comes back up. Watch what a single press does to three programs at once.
versus two hat blocks
The middle counter is the one that surprises people. Nothing is wrong with it — a loop really does check that fast, and every check really is a separate answer.
Nothing there is broken. A loop really does get round hundreds of times a second, and each time it asks is pressed? the honest answer is still yes — so if that loop plays a sound or counts something, it does it hundreds of times from one finger. The two hat blocks each fire once, and they fire at different moments: pressed the instant the button goes down, bumped only when it comes back up.
The three options, and what each is for:
when program starts :: events hat set movement motors to [B v] and [C v] :: movement start moving [straight: 0] :: movement wait until <[1 v] is pressed? :: sensors> stop moving :: movement
The robot drives until something presses the sensor. Note that the movement is started unmeasured on purpose — the sensor decides when to stop, not a distance.
Touch sensors are everywhere in machines you cannot see into: a lift knows the doors are shut, a printer knows the lid is closed, a washing machine will not spin until it is latched. They are safety devices as much as inputs.
Say this back: “Reset the timer when it starts. Read the timer when it stops.”
One part with a cable. That is all the electronics.
| Part | What it is doing here |
|---|---|
| EV3 Intelligent Brick | The clock, the screen and the speaker. All three are part of the stopwatch. None of them needs a port. |
| Touch Sensor | The button. Port 1, as always. |
| The lever (no cable) | A beam over the sensor, so a whole hand can hit it. It makes each press quicker and surer. That matters for tenths of a second. |
| No motor | Nothing on this model moves by itself. |
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.
This is one of the easiest port tables in the course. Have a look!
| Part | Port | Why this one |
|---|---|---|
| Touch Sensor (the button) | 1 | In this course, the Touch Sensor always goes in port 1. |
| Everything else | none | No motors at all. The clock, screen and speaker are inside the Brick. |
Check your own build now:
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.
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.
EV3 until somebody changes it.EV3.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.
Either is fine. The model does not go anywhere. Just check the cable. It must not make the model slide when someone hits the lever hard.
Now test yourselves with it. Write down every time. You need lots of them to learn from.
Step 2 is the number to keep. When a person times by hand, it is about two tenths out at each end. Now you have measured your own. So you know.
The clock is not the slow part. You are! Know by how much. Then you can trust your measurements.

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.
One page at a time — use Next and Previous, or the ← → keys. Fullscreen makes it big enough to build from.
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.
Seven blocks, and nothing moves. Like the Fencing sword, this is really "make it work". Click to start. Click to stop. The time shows up.
when program starts :: events hat clear display :: display write [PRESS TO START] at line (1) :: display [1 v] wait until [bumped v] :: sensors reset timer [1 v] wait until [bumped v] :: sensors write (timer) at line (3) :: display
Walk it in the Brick's order:
What success looks like: click, wait a few seconds, click again. A sensible number shows up. Test it. Count "one elephant, two elephant" up to ten. Does the Brick agree with you?
Does it stop as soon as you start it? Then you have used pressed, not bumped, somewhere. Your hand is still on the lever at the second wait. So the wait ends at once. It is the Timber Saw problem, in a new place.
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.
Measure how fast you react. Start the watch. Stop it as fast as you can. Do this ten times. Tell us all ten times and your best one. Then do it for everyone in your group. Put the numbers side by side.
Make it easy to use. Before each press, the screen must say what to do. At the end, it must show the result clearly. Then it must be ready to time again, with no restart of the program. Someone who has not seen it should get it right the first time.
Test a person against a machine. Time something twice. First, press the stopwatch by hand. Then let the robot start and stop the timing by itself. Tell us both times. Say where the difference came from.
Build a reaction tester and try it on your class. Reaction time is how long you take to act after a signal. Your machine must test a person's reaction time fairly. They must not be able to guess when the signal is coming. The number must show how fast they reacted, not how well they guessed. You will need a second person to give the signal. Your robot cannot yet surprise people on its own. Plan on paper before you build. Work out just which moment starts the clock and which moment stops it. Be careful. If the clock starts before the signal, you are measuring the wrong thing. Two questions when you show it. What exactly is your machine measuring, second by second? And could someone cheat your tester? What would you change to stop them?