Challenge 1
Build a swing from nothing. Starting with the robot hanging completely still, get it swinging to at least halfway up to horizontal using kicks alone — no pushing it by hand. Report the wait value you used and how many kicks it took.
EV3 Robotics›Level 1 · Beginner›Lesson 27
Level 1 · Lesson 27 · EV3-L01-2760 minutes · Ages 9–16 · Model: Hanging Horizontal Bar Robot
The Hanging Bar Robot: a gymnast that hangs from a horizontal bar by its hands, with a motor for each leg. It swings — and if you get the timing right, it swings all the way over.
Look at what it has to work with. It is not standing on anything. It cannot push the floor, it has no wheels, and its blade is not shoving a pile of earth. It is hanging in the air with two legs.
So how does it move? By throwing its own weight about, and letting the rest of its body answer. That is a way of moving you have not met, and it is how every gymnast, diver and cat in the world does it.
The high bar in men’s artistic gymnastics. A gymnast hangs from a steel bar and, from a standing start, works up to swinging in complete circles around it.

Watch a gymnast start. They cannot jump — their hands are on the bar. What they do is kick: throw the legs forward, then whip them back, in time with the swing they already have.
Each kick is small. But a kick delivered at the right moment adds to the swing, and after a dozen of them the gymnast is going round. This is the same building-up you saw with the Clock Ticking in Lesson 13 and the Crazy Pirate Ship in Lesson 23 — except that here there is nothing to push on at all. The energy comes from muscles moving one part of the body relative to another.
Hold still on a bar and you will hang there for ever. Being strong does not help; there is nothing to be strong against.
And kicking at the wrong moment is worse than not kicking. Throw the legs forward while the body is already swinging forward and you add to it; do it while swinging back and you cancel your own swing out.
When you have nothing to push against, the only thing you can do is move part of yourself — and when you move it is everything.
This model has no step-by-step manual, and the video below is not one. It is a film of a finished robot swinging. Watch it carefully anyway — particularly for when in the swing the legs move — then build from the model your teacher has, or from a photograph of a finished one. You are not missing a page; the page does not exist.
A hanging body cannot move itself as a whole. It can only move one part against another — and the rest of the body swings the opposite way in reply.
There is a rule underneath this that physicists state very simply: push on something and it pushes back on you, just as hard. Your legs push against your body, so your body pushes against your legs. Neither can move without the other moving too.
You can feel it yourself. Sit on a swivel chair with your feet off the floor and swing your arms hard to the left. The chair turns right. You did not touch anything.
| Kind of machine | What it pushes against |
|---|---|
| Tricycle, Bulldozer, Toddle Bot | The floor. |
| EV3 Fan, Folding Fan Robot | The air. |
| Hanging Bar Robot | Only itself. And the timing has to be right, or it goes nowhere. |
A small movement at the right moment beats a big movement at the wrong one. On this model, that is not advice — it is the only way it works at all.
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.
Some models have no motors and no sensors at all. They are not lesser lessons — they are where the physics lives. A build that stores energy, changes a force, or turns one kind of motion into another explains why the powered models later need the gearing and the speeds they do.
Gears, pulleys and levers look like three different topics and are three shapes of the same deal: whatever you gain in force, you pay for in distance. Halve the effort and you move twice as far; move half as far and you need twice the effort. No arrangement of anything gives you both, and recognising that saves a great deal of time hunting for one.
What a mechanism actually does is let you spend the same effort in a form you can manage — a little at a time instead of all at once, or all at once instead of a little at a time.
| Tutorial | The question it answers |
|---|---|
| Gearing up and gearing down | How do I trade turns for force? |
| Changing the direction of a turn | Why is it going backwards, and how do I drive an axle at 90°? |
| Pulley systems | How does a rope let a small motor lift a big load? |
| Levers — effort, load and pivot | Where should the pivot go? |
| Elastic and stored energy | How much further does pulling back twice as far actually get me? |
| Scissor mechanisms | How do I make something extend a long way — and why won’t it start? |
| Oscillatory motion | How do I turn going round into going back and forth? |
| Centre of gravity | Why does it keep falling over? |
| Biomimetic mechanisms | How does a machine walk without ever being told to? |
Friction is what makes wheels grip and also what wastes effort. Every mesh, pin and rope turn loses a little to it, so a mechanism with more parts delivers less than the arithmetic promises. A build that binds — that is stiff to move by hand — is losing far more than that, and no amount of extra motor power fixes a mechanism that is rubbing.
Before measuring anything, turn the mechanism by hand. It should move smoothly and coast a little. If it does not, fix the build first; numbers taken off a binding mechanism describe the binding, not the idea you were trying to test.
Since there is nothing to program, the work is measuring. Change one thing, keep everything else the same, and record what happened — pull the car back 5 cm, then 10, then 15, and measure how far each one travels. Three readings at each setting, not one, because a single run is not evidence.
That is genuinely how engineers test, and it is the same discipline that makes debugging a program work: change one thing at a time.
Say this back before moving on: “It cannot push on anything, so it moves its legs and its body answers.”
Three parts with cables — and you have to tell us which motors these are, because this model has no written parts list. What you can say without being told: there are two, and they are a matched pair.
| Part | What it is doing here |
|---|---|
| EV3 Intelligent Brick | Runs the program and is the gymnast’s body. It is the heavy thing the legs are throwing about. |
| Two motors — you decide which | The legs. Ports B and C, and every program says B and C rather than naming a motor. |
| The bar and the hands (no cable) | The only contact with the world. They must let the robot rotate freely — a tight grip stops the whole thing working. |
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 leg motor | B | B and C are the pair. Both legs must kick together, so this is exactly what the pair is for. |
| Right leg motor | C | Same job, same instant — as on the Mechanical Frog. |
| Sensors | none | The robot cannot feel where in the swing it is. It kicks to a rhythm you set and hopes it matches. |
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, and there is no sensible alternative today. A USB cable on a machine that is trying to rotate through a full circle will wrap round the bar within two swings and stop the experiment dead.
Six blocks: kick out, kick back, eight times. Give the robot a small push by hand to start it swinging before you run the program — a gymnast starts from a little swing too.
when program starts :: events hat set movement motors to [B v] and [C v] :: movement set movement speed to (100) % :: movement repeat (8) move [forward v] for (60) [degrees v] :: movement move [backward v] for (60) [degrees v] :: movement end
Walk it in the order the Brick runs it:
What success looks like: start it swinging gently by hand, run the program, and the swing should get visibly bigger over the eight kicks. Getting all the way over the bar is the mission, not the first run.
It very probably will not work the first time, and that is not a failure. The kicks are on a fixed rhythm and the robot’s swing has its own — and unless the two happen to match, half your kicks are fighting the swing. Section 10 is how you find the match.
You are tuning, the way you did on the Clock Ticking. Change one thing, run it, and watch for the whole eight kicks before judging — a swing that is growing looks a lot like one that is not, for the first two or three.
Step 5 is the same test as the Crazy Pirate Ship, and it is worth repeating because it is the fastest way to be sure. Anyone can add energy by accident; only somebody who understands the timing can take it out deliberately.
The robot has no idea where it is in its swing. Every bit of the timing is in the numbers you chose.
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.
The same build on Google Drive — sometimes a video, sometimes a scan:
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.
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.
Build a swing from nothing. Starting with the robot hanging completely still, get it swinging to at least halfway up to horizontal using kicks alone — no pushing it by hand. Report the wait value you used and how many kicks it took.
Prove that timing beats force. Find a wait that builds the swing well, then show that a much smaller kick with the same timing still builds it, while a much bigger kick with bad timing does not. Three runs of each, with the swing angle you reached.
Kill a swing deliberately. Starting from a big swing, choose a timing that brings the robot to a near stop as quickly as possible, and time how long it takes. Then explain in one sentence what makes a kick remove energy rather than add it.
Get it over the bar. Your gymnast must complete at least one full rotation around the bar, starting from rest, driven only by the kicks in your program. Nobody may push it, and it must not be swung by hand at any point. Plan on paper before you build. Measure your robot's natural swing time first, work out from it what the gap between kicks should be, and write your prediction down before you test it. Tuning blindly can take an hour; tuning from a measurement takes minutes. Two questions when you demonstrate it. Your robot has nothing to push against — so where does the energy that lifts it over the bar come from? And how did you choose your timing, and how close was your prediction?
