Basic
Follow the black line from the start box to Home. Stop fully inside Home.

Quick Learn — the model, the instructions, the program and the challenges. The theory is in Full Lesson.
EV3 Robotics›Level 2 · Intermediate›Lesson 20
Level 2 · Lesson 20 · EV3-L02-2060 minutes · Ages 8+ · Model: Racecar
The Racecar: two Large Motors drive the back wheels. A small wheel at the front rolls freely. The body is shaped like a wedge, with a wing at the back.
Look closely at the front wheel. It does not steer. There is nothing to point it. It just rolls wherever it is pulled.
So how does this car go round a corner? It drives one back wheel faster than the other. By the end of the lesson, you will set those two speeds yourself, one number each.
A Formula 1 car takes a fast corner at over 200 km/h. Its front wheels do steer. But that is not all that gets it round.

Here is the big fact of this lesson. On a bend, the outside wheel goes further than the inside wheel. Both go round the same corner in the same time. But the outside circle is bigger. So the two wheels cannot turn at the same speed.
That is why every real car has a differential. It is a gearbox between the driving wheels. Its only job is to let them turn at different speeds while both still push. It was invented in the 1820s. Every car on the road still has one today.
Fix two driving wheels to one stiff axle, and the car cannot turn well. One wheel has to skid sideways all the way round the bend. You can hear it in a shopping trolley with a stiff wheel. You can feel it in a go-kart. A go-kart has no differential. Its inside back wheel hops off the ground on every turn.
A turn is a speed difference. It has never been anything else.
The Tank Bot, in Level 1, steered with one number: 0 for straight, 100 to spin. Today you set the two motor speeds yourself, as the Lawnmower did. You will see what steering was doing all along.
move for (2) [rotations v] at (50) (50) % speed :: movement move for (2) [rotations v] at (50) (25) % speed :: movement move for (2) [rotations v] at (50) (-50) % speed :: movement
The first number is the left motor. The second is the right. This order comes from set movement motors to [B v] and [C v]. Get that block wrong, and every turn goes the wrong way.
| Left | Right | What the car does |
|---|---|---|
| 50 | 50 | Straight ahead. Same speeds, same distance. |
| 50 | 25 | A wide curve to the right. The left wheel goes further, so the car swings away from it. |
| 50 | 0 | Turns round the stopped right wheel. It is the tightest turn that still moves forward. |
| 50 | −50 | Spins on the spot. The wheels push against each other, and the car goes nowhere. |
The rule to remember: the car always turns away from the faster wheel. If the left is faster, it goes right. Say it out loud once. Then you will never have to work it out again.
Most of the time, you want to say what the car should do, not what each motor should do. Steering is the easier block. Keep using it.
Use the pair when steering makes a curve hard to get. Use it when one wheel must be stopped exactly. Most of all, use it when one motor is fitted differently from the other. Then you can make up for it.
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.
Two numbers, left then right. The car turns away from the faster one.
Speed is set separately from movement. You tell the motor how fast it should go, and then you tell it to go — two blocks, in that order.
| Block | What it does |
|---|---|
[A v] set speed to (25) % :: motors | Sets the speed for this motor from now on. Nothing moves — it only changes what the next movement will do. |
[A v] run [clockwise v] for (2) [rotations v] :: motors | Now moves, at whatever speed was last set. |
when program starts :: events hat [A v] set speed to (25) % :: motors [A v] run [clockwise v] for (2) [rotations v] :: motors
Swap those two blocks round and the program still contains a speed of 25 % — it just never gets used. Both shafts below are asked for exactly 2 rotations; watch how long each one takes.
speed first — works
speed last — does nothing
Both shafts turn exactly 2 rotations. Only the time they take is different — and the right-hand program never gets the slow movement it was written to have.
The right-hand movement is over before the left is a third of the way round, because it ran at the default speed. Its set speed to () block does run — you can see it light up — but by then the movement it was meant to slow down has already happened. A speed block only ever affects the movements after it. This catches people out constantly.
A high speed is not a better program. Slow movements are gentler on the gears, easier to watch and debug, and look more like the real machine — a barrier that snaps up in a fraction of a second reads as broken rather than fast.
Look at your car. How many electronic parts does it have? Fewer than you might think, for something this fast.
| Part | What it is doing here |
|---|---|
| EV3 Intelligent Brick | Sits low, in the middle. It is most of the car’s weight. That is why the model puts it between the axles. |
| Large Motor ×2 — the back wheels | Large, not Medium, because these carry the whole car. Each one drives one wheel. That is what lets each side have its own speed. |
| The small front wheel (not electronic) | Rolls freely and does not steer. It goes where the back sends it. It is smaller than the back wheels, so the nose sits low. |
| The back wing (not electronic) | On a real car, it presses the tyres into the road. On yours, it puts weight over the driving wheels. That does the same job, for the same reason. |
No sensors at all. Every turn this car makes is a number you chose. Nothing checks if it worked. That is called open-loop. It is why the Tank Bot, in Level 1, needed a Gyro to turn.
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 |
|---|---|---|
| Left back wheel (Large) | B | B and C are the pair. The Movement blocks expect them. B is the left number in today’s block. |
| Right back wheel (Large) | C | The right number. Swap these two, and every turn goes the wrong way. |
“Left” means the car’s left, not yours. Sit behind the car, facing the way it drives, and decide from there. Many wrong-way turns in this lesson come from standing in front of the model.
Check your own wiring 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.
Use Bluetooth. This time you must. This car drives away from you fast. A USB cable would either pull the car off course or pull the laptop off the desk.
Stuck? The long version, with a photograph of every screen, is in the Brick & Bluetooth guide.
One change at a time. Guess what will happen before each run. Mark the car’s starting spot with tape. Then you can see how close it gets back.
Steps 4 and 5 are the point of the lesson. They are not really about the block. Nothing in this program checks if the car went where you meant. It tells the wheels what to do and hopes. That is open-loop. Lots of robots work this way.
Telling the motors what to do is not the same as getting where you want. The floor gets a say too.
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.

One lap of an oval. Down the straight, round the bend, back down the other straight, and round again.
when program starts :: events hat set movement motors to [B v] and [C v] :: movement clear display :: display write [LAP 1] at line (1) :: display play beep (72) for (0.2) seconds :: sound repeat (2) move for (3) [rotations v] at (60) (60) % speed :: movement move for (2) [rotations v] at (60) (20) % speed :: movement end stop moving :: movement play sound [Communication / Goodbye v] until done :: sound
set movement motors first. It says which motor is the left number. Everything after it needs it. One block makes sure.repeat (2) makes the oval. Two straights and two bends. If your bends are not half-circles, the car will not come back to where it started.What success looks like: the car drives a rounded rectangle. It ends about where it began, pointing about the way it started. About is the honest word. A Gyro, like the Tank Bot's, can do better.
If the car turns left instead of right, your B and C are swapped. Fix the cables, not the numbers. Change the numbers, and every new program will be wrong in a hidden way.
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 2019 RoboMission Elementary — Smart Passenger Transport · official WRO game mat, 2362 × 1143 mm
The challenges name these places rather than distances, so the same challenge works on any mat:
Written for the WRO 2019 RoboMission Elementary mat. Each one is a single program run that starts in the ✕ box.
Follow the black line from the start box to Home. Stop fully inside Home.

In one program run, follow the black line to Home, then on to School.

In one run, go to Home, then School, then the Zoo. Stay on the black line all the way.

In one run, go to Home, School and the Zoo, then the Shopping Center. Stay on the black line all the way.

In one run, charge at the Battery Area first. Then go to the Shopping Center, the Cinema, and finish at Home. Stay on the black line all the way.

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.
Drive the length of the table and back. Use only pairs of speeds that are the same. Finish within a hand's width of the start.
Drive a figure of eight. One loop turns left and one loop turns right. Use only the two-speed block. One of your numbers will have to be negative.
Find the tightest circle the car can drive while still going forward. Then find the widest circle that still joins up with itself. Write down both pairs of speeds.
Set out a slalom course. That is a row of things to pass. The car goes one side, then the other. Write the whole route as a list of speed pairs and rotation counts. Do this BEFORE you drive it. Then run it once. You may not change anything between the plan and the run. Planning it without a test run is the challenge.