Challenge 1
Start a swing from nothing. The robot starts hanging quite still. Get it to swing at least halfway up to level with the bar. Use only kicks. Do not push it by hand. Tell us the wait number you used. Tell us how many kicks it took.
Quick Learn — the model, the instructions, the program and the challenges. The theory is in Full Lesson.
EV3 Robotics›Level 1 · Beginner›Lesson 27
Level 1 · Lesson 27 · EV3-L01-2760 minutes · Ages 7+ · Model: Hanging Horizontal Bar Robot
The Hanging Bar Robot: a gymnast robot that hangs from a bar by its hands. It has a motor for each leg. It swings. If you get the timing right, it swings all the way over!
Think about what it has to work with. It is not standing on anything. It cannot push on the floor, and it has no wheels. It just hangs in the air with two legs.
So how does it move? It throws its own weight about, and the rest of its body moves back. This is a new way of moving for you. Every gymnast, diver and cat moves like this.
The high bar in men’s gymnastics. A gymnast hangs from a steel bar. They start by hanging still. Soon they are swinging in full circles round the bar.

Watch a gymnast start. They cannot jump, because their hands are on the bar. Instead, they kick. They throw their legs forward, then pull them back fast. They kick in time with the swing.
Each kick is small. But a kick at the right moment makes the swing bigger. After about twelve kicks, the gymnast is going right round. You saw swings build up like this with the Clock Ticking in Lesson 13. You saw it on the Pirate Ship in Lesson 7 too. But here, there is nothing to push on at all. The muscles move one part of the body against another.
Hold still on a bar, and you will hang there for ever. Being strong does not help. There is nothing to push against.
Kicking at the wrong moment is worse than not kicking. Throw your legs forward while you swing forward, and the swing grows. Do it while you swing back, and you stop your own swing.
With nothing to push against, you can only move part of yourself. And when you move it is what matters most.
This model has no step-by-step instructions. The video below is not instructions either. It shows a finished robot swinging. Watch it carefully anyway. Look for when the legs move in the swing. Then build from your teacher’s model, or from a photo of a finished one. You are not missing a page. There is no page.
A hanging body cannot move all of itself at once. It can only move one part against another. Then the rest of the body swings the other way.
Scientists have a simple rule for this: push on something and it pushes back on you, just as hard. Your legs push on your body, so your body pushes on your legs. One cannot move without the other moving too.
You can feel it yourself. Sit on a spinning chair with your feet off the floor. Swing your arms hard to the left. The chair turns right! You did not touch anything.
| Kind of machine | What it pushes against |
|---|---|
| Driving Base, Walking Bot, Toddle Bot | The floor. |
| EV3 Fan, Wind Plane | The air. |
| Hanging Bar Robot | Only itself. And the timing must be right, or it goes nowhere. |
A small move at the right moment beats a big move at the wrong one. On this model, it is the only way it works.
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 moves back.”
Three parts with cables — and you must tell us which motors these are. This model has no parts list. But you can say two things already. There are two, and they match.
| Part | What it is doing here |
|---|---|
| EV3 Intelligent Brick | Runs the program and is the gymnast’s body. It is the heavy part that the legs throw about. |
| Two motors — you decide which | The legs. Ports B and C. Every program uses B and C, not a motor’s name. |
| The bar and the hands (no cable) | The only part that touches the world. They must let the robot turn freely. If they grip too tight, nothing works. |
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 leg motor | B | B and C are the pair. Both legs must kick together. That is just what the pair is for. |
| Right leg motor | C | Same job, at the same moment. Just like the Mechanical Frog. |
| Sensors | none | The robot cannot feel where it is in the swing. It kicks to the beat 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.
Use Bluetooth. Today there is no other good choice. This robot tries to swing in full circles. A USB cable would wrap round the bar in two swings. Then everything stops.
You are tuning the robot, like you did on the Clock Ticking. Change one thing, run it, and watch all eight kicks before you decide. For the first two or three kicks, it is hard to tell if the swing is growing.
Step 5 is like step 4 on the Clock Ticking in Lesson 13. It is the quickest way to be sure. Anyone can make a swing bigger by luck. Only someone who understands the timing can make it smaller on purpose.
The robot does not know where it is in its swing. All of the timing comes from the numbers you chose.

Six blocks: kick out, kick back, eight times. Before you run the program, give the robot a small push to start it swinging. A gymnast starts with 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
Read it in the order the Brick runs it:
What success looks like: start it swinging gently by hand, then run the program. The swing should get bigger over the eight kicks. Going right over the bar is the mission. It will not happen on the first run.
It very probably will not work the first time, and that is fine. The kicks follow a fixed beat. The robot's swing has its own beat. If they do not match, half your kicks fight the swing. Section 10 shows you how to make them match.
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.
The same build on Google Drive — sometimes a video, sometimes a scan:
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.
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.
Start a swing from nothing. The robot starts hanging quite still. Get it to swing at least halfway up to level with the bar. Use only kicks. Do not push it by hand. Tell us the wait number you used. Tell us how many kicks it took.
Prove that timing beats force. Find a wait that builds the swing well. Then use a much smaller kick with the same timing. Show that it still builds the swing. Then use a much bigger kick with bad timing. Show that it does not. Do three runs of each. Write down the swing angle each time.
Stop a swing on purpose. Start with a big swing. Pick a timing that brings the robot almost to a stop, as fast as you can. Time how long it takes. Then say in one sentence what makes a kick take energy away, not add it.
Get it over the bar. Your gymnast must go all the way round the bar at least once. It starts from still. Only the kicks in your program may move it. Nobody may push it. Nobody may swing it by hand, at any time. Plan on paper before you build. First, time one swing of your robot on its own. Use that to work out the gap between kicks. Write your guess down before you test it. Tuning by guessing can take an hour. Tuning from a measurement takes minutes. Two questions when you show 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? How close was your guess?