Challenge 1
Collect everything in a marked area on the mat. Scatter at least eight balls, record where they are, then run a pattern that collects all of them. Any ball left behind means the pattern has a gap — find it and say where it was.
EV3 Robotics›Level 1 · Beginner›Lesson 30
Level 1 · Lesson 30 · EV3-L01-3060 minutes · Ages 9–16 · Model: Ball Collector
The Ball Collector: a driving base with a row of hanging fingers across its front. Drive at a ball and it pushes past the fingers into the cage; the fingers swing back and it cannot get out again.
You have driven robots to places before. This one has nowhere in particular to go — its job is to visit everywhere.
That is a genuinely different problem. Getting to a spot has an obvious test: did you arrive? Covering an area does not, because the bit you missed is by definition the bit you did not look at.
The little round robot that cleans the floor. It has no idea where the dirt is, so it does not try to go to the dirt — it tries to go everywhere, and lets the dirt come to it.

Watch one for a minute and you will see it is not wandering randomly — it is running a pattern. Long straight runs, a turn, another straight run alongside the first. Back and forth, like mowing a lawn or reading a page.
The pattern matters because of overlap. Each pass covers a strip as wide as the machine. Space the passes further apart than that and you leave untouched lanes between them; space them closer and you waste time going over ground you have already done.
A robot with no pattern — one that just drives about and bounces off things — does eventually cover most of a room, but it takes many times longer and it can never say it has finished.
And here is the part that catches people out: from the outside, a robot that missed a strip looks exactly like a robot that did the job. It is moving, it is busy, it comes back with something. You only find out by checking the floor.
Looking busy is not the same as having covered everything. A collector has to be judged on what it left behind.
To cover an area you need a repeating shape: a straight run, a turn, a straight run back. Everything else is choosing the numbers.
You already have every block you need. A straight is a move forward; a turn on the spot is the two-speed block from Lesson 28 with opposite numbers; and repeat does the pattern as many times as it takes.
| Choice | What it costs you if you get it wrong |
|---|---|
| Passes spaced too far apart | Missed lanes. The robot looks like it worked and did not. |
| Passes spaced too close | Wasted time going over the same ground. Nothing is missed, but a real machine runs out of battery. |
| Turn slightly wrong | The whole pattern tilts, and every later pass is wrong too — the drift you measured in Lesson 35, now with consequences. |
Space your passes a little closer than the width of your robot. A bit of overlap is cheap; a missed lane is a failed job.
A driving base has two Large Motors, one per wheel. You could drive them with two separate motor blocks — but they would never start at quite the same instant, and the robot would curve away. EV3 has a separate family of Movement blocks that treat the pair as a single driving base.
| Block | What it does |
|---|---|
set movement motors to [B v] and [C v] :: movement | Tells the Movement blocks which two ports are the driving wheels. Put it at the top of the program, before any movement. |
move [forward v] for (2) [rotations v] :: movement | Drives both wheels together, so the robot travels in a straight line. |
move for (1) [rotations v] at (75) (25) % speed :: movement | Drives the two wheels at different speeds, which makes the robot curve. |
set movement speed to (50) % :: movement | Sets how fast the driving base travels from now on. |
set movement motors to [B] and [C] is the block that decides which two motors every Movement block after it will drive. It does not look at the robot. It drives the two ports you name, whether or not there is a motor in them — so those two letters have to be the two sockets the cables are actually in.
This is the single commonest reason a driving base does nothing, and it is invisible in the program: every block is spelled correctly and the robot still will not go.
the same program on both robots
The yellow outline marks the two ports the block is driving. A robot only goes straight when both of them have a motor in them.
Both robots run the identical program. The left one has its motors in B and C, so both named ports have a motor and the robot drives straight. The right one is plugged into A and B: the block drives B, finds nothing in C, and never mentions the motor in A at all — so one wheel turns, one wheel sits there, and the robot swings round the dead one instead of driving.
If neither named port has a motor in it — cables in A and D, say, with the block still set to B and C — the robot does not move at all. The program runs happily to the end and the Brick reports nothing wrong, because as far as it is concerned it did exactly what it was told.
So before you look for a bug in the program, look at the cables: read the port letters off the Brick, then make the block say those two. B and C are only the usual choice, not a rule — if your build has the driving motors in A and D, set the block to A and D and everything works.
Everything a driving base can do comes from those two speed numbers. Try each button below and watch the trail the robot leaves.
The path is worked out from the two wheel speeds in the block, not drawn by hand — so changing the preset changes the numbers and the shape together.
Notice there is no steering block anywhere in that program, and no steering part anywhere on the robot. The turn is made entirely by driving the two wheels different amounts.
when program starts :: events hat set movement motors to [B v] and [C v] :: movement move [forward v] for (2) [rotations v] :: movement move for (1) [rotations v] at (50) (-50) % speed :: movement
“Move forward 2 rotations” says nothing about the floor — it says how many times the wheels go round. How far the robot actually travels depends on how big the wheels are, and once round a standard EV3 driving wheel is about 17.5 cm.
Before doing any sums, get a feel for it. Drag the robot along and watch both scales at once — rotations on top, centimetres underneath, the same line. Land on the half marks: there is a number between 1 and 2, and it is 1.5.
Drag the robot, or use the arrow keys — it moves in half rotations. Rotations above the line, centimetres below.
1.5 — a half rotation past 1. Half a turn of the wheels is 8.75 cm, so halves matter.
35 ÷ 17.5 = 2. That is a number you can type straight into the block.
set movement motors to [B v] and [C v] :: movement set movement speed to (30) % :: movement move [forward v] for (2) [rotations v] :: movement
Steering at right 100 or left 100 drives the two wheels in opposite directions, so the base stops travelling and pivots where it stands. The angle it sweeps is a simple doubling of the rotations:
Half a rotation is the one worth remembering: a square corner, 90°.
| Rotations | The robot turns |
|---|---|
| 0.25 | 45° — half a corner |
| 0.5 | 90° — a square corner |
| 1 | 180° — turn round and face back |
| 2 | 360° — all the way round |
The one to memorise is 0.5 rotations = 90°. Everything else follows from doubling or halving it.
set movement speed to (20) % :: movement move [right: 100] for (0.5) [rotations v] :: movement
Turn slowly. The wheels on a driving base are big and the robot carries a lot of weight, so at full speed it keeps going after the motors stop and lands past the angle you asked for. Somewhere between 15% and 30% speed is where turns become repeatable. A turn that overshoots is almost always a turn taken too fast, not a wrong number.
These figures belong to your robot. The distance depends on the wheels and the angle depends on how far apart they are, so a wider base needs a different number for 90°. Test it, measure what actually happened, and adjust — the same discipline as the Gyro Sensor tolerance.
Every wheeled vehicle steers this way — a tank, a digger, an office chair with two driven castors. Cars use a steering rack instead, but a robot that turns by driving its wheels at different speeds needs no steering mechanism at all.
Machines repeat. A wiper sweeps, a conveyor runs, a ride goes round — and none of that should mean copying the same blocks over and over. A loop says “do this again” once.
| Block | What it does |
|---|---|
repeat (10) end | Runs the blocks inside a set number of times, then carries on below. |
forever end | Runs the blocks inside over and over, and never carries on below. |
repeat until <> end | Repeats until a condition becomes true — a loop with a sensor as its exit. |
Anything placed after a forever loop will never run. Not “runs late” — never. Both programs below end with the same block: set the status light green.
repeat (3)
forever
↑ this block never runs
Both programs contain the same green-light block. Let it run as long as you like — the right-hand ring will never turn green.
The repeat loop counts its three passes, stops, and moves on to the block underneath, so its light turns green. The forever loop reaches the bottom of its own blocks and jumps straight back to the top, so the block underneath is never reached — however long you leave it. If a program seems to stop half way through, look for a forever loop above the blocks that are not happening.
A program is a list, and the Brick works down it once. Every block runs, in order, and when the last one is done the program is over. That is fine for a list of instructions — drive, turn, beep, stop — because each is a thing you do once.
A sensor is not a thing you do once. Asking is 1 pressed? gives you an answer about this instant, and an instant later it may be wrong. Checking a sensor once tells you what the world was like at the moment the program started — which is almost never what you wanted to know.
So a program that has to react must ask again, and again, for as long as it is running. That is the whole job of the loop: not to repeat an action, but to keep the question being asked.
Wrap a sensor check and the motor it controls in a forever loop and you have built a closed-loop control system — the pattern behind every line follower, thermostat and cruise control:
It is called closed because the output feeds back round to the input: the motors move the robot, moving the robot changes what the sensor sees, and what the sensor sees changes the motors. Break the circle at any point and the robot stops responding.
when program starts :: events hat
forever
if <[1 v] is pressed? :: sensors> then
[A v] start motor [clockwise v] :: motors
else
[A v] stop motor :: motors
end
endRead it as a sentence and it is almost too simple to need explaining: for ever, if the button is pressed run the motor, otherwise stop it. The motor now follows the button for as long as the program is running.
This is the mistake nearly everybody makes first, and it is a hard one to spot because nothing about it looks wrong:
when program starts :: events hat if <[1 v] is pressed? :: sensors> then [A v] start motor [clockwise v] :: motors else [A v] stop motor :: motors end
The logic is perfect. The ports are right. Nothing is misspelled. And the robot will ignore the button completely — because the Brick reaches that if/else a few milliseconds after you press Run, finds the button not pressed, takes the else branch, stops the motor, runs out of blocks and ends. By the time a finger arrives, there is no program left to notice it.
with forever — a closed loop
without it — the common mistake
↑ running — for the only time
Both programs contain exactly the same if/else. The only difference is the forever block around one of them.
Both programs contain exactly the same if/else. The counter is what gives it away: one keeps checking for as long as it runs, the other is stuck on the single check it made before anybody touched anything. A student who has seen this once stops writing it.
The tell on a real robot is a program that ends the instant you start it — the Brick returns to its menu almost immediately. If a sensor program finishes rather than waits, the loop is what is missing.
Say this back before moving on: “Cover an area with parallel passes, spaced a bit narrower than the robot.”
| Part | What it is doing here |
|---|---|
| EV3 Intelligent Brick | Runs the program and sits over the driven wheels. |
| Large Motor ×2 | Ports B and C. Straights and turns, as on the Tricycle. |
| The finger gate (no cable) | A row of loose fingers on a shaft. They swing inwards to let a ball in and will not swing outwards to let it go. |
Those two numbers are the lesson’s real tools. You cannot plan a coverage pattern without knowing how wide your robot is and how far it goes per rotation.
Sensors go in ports 1, 2, 3, 4. Motors go in ports A, B, C, D. They are not interchangeable, and nothing will tell you politely if you swap them.
| Part | Port | Why this one |
|---|---|---|
| Left drive motor | B | B is left and it is the first number in the two-speed block. Today that matters: every turn in your pattern depends on it. |
| Right drive motor | C | Right is C, second number. |
| Sensors | none | The collector cannot see balls or walls. Everything it does, you planned. |
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.
Bluetooth. A robot running a coverage pattern crosses its own path repeatedly, and a USB cable will be driven over, dragged and eventually wrapped round a wheel.
Six blocks. A straight, then a spin, four times over — which traces a square rather than a proper back-and-forth sweep. That is deliberate: it is the simplest pattern that goes somewhere, and the next section is about improving it.
when program starts :: events hat set movement motors to [B v] and [C v] :: movement set movement speed to (40) % :: movement repeat (4) move [forward v] for (4) [rotations v] :: movement move for (1) [rotations v] at (40) (-40) % speed :: movement end
Walk it in the order the Brick runs it:
What success looks like: the robot traces a rough square and collects any ball that happened to be on one of the four lines. Count what it got and — more importantly — count what it missed and where. The middle of your square is almost certainly untouched.
The 1 rotation in the spin is a guess. It will not be exactly a quarter turn on your robot. Adjust it until the square closes — that is the first thing to fix.
One change at a time. After every run, put the balls back where your sketch says they were, so each pattern gets the same test.
Step 5 is the one to remember. Nothing failed, nothing stalled, no block was wrong — and half the floor is still covered in balls. This is the kind of bug you can only find by checking the outcomerather than watching the robot.
Judge a collector by what is left on the floor, never by how purposeful it looked.
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.
Use the viewer's own controls to zoom and turn pages. 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.

This model drives, so its challenges are run on a mat. Mats differ between branches — check you are looking at the one in your room.

WRO 2026 RoboMission Elementary — Robot Rockstars · official WRO game mat, 2362 × 1143 mm
The challenges name these places rather than distances, so the same challenge works on any mat:
Work through the challenges in order — each is harder than the last. The mission comes after all three, and it is meant to make you plan before you build.
Collect everything in a marked area on the mat. Scatter at least eight balls, record where they are, then run a pattern that collects all of them. Any ball left behind means the pattern has a gap — find it and say where it was.
Prove your spacing matters. Run the same area three times with passes spaced one robot-width apart, three-quarters of a width, and one and a half widths. Count what is collected each time and report all three, with a sentence on why the widest spacing failed.
Make it efficient as well as complete. Time your runs. Find the pattern that collects everything in the shortest time, and explain the trade you made — tighter spacing never misses but always takes longer.
Clear an area you have not seen in advance. Your teacher will mark an area on the mat and scatter the balls without telling you where. Your collector must sweep it and bring back as many as it can, starting from a station of your choosing. Plan on paper before you drive. You cannot plan around where the balls are because you will not know, so plan around covering the space — and work out how you will prove afterwards that you covered all of it. Two questions when you demonstrate it. How do you know your robot visited every part of the area, rather than just most of it? And if it missed something, was that a driving problem or a pattern problem?