Coding Project 3 — Motors and Ports
KIPR · Botball Explorer
Activity Sections

Introductory · EV3 Coding Project 3

Motors and Ports

Your robot stops talking and starts moving — with its wheels safely off the ground.

Project
Coding Project 3
Strand
Coding
Phase
Make It Move
Time
One class period
What You Are Doing
Plugging in motors, checking their direction, and writing your first program that makes something turn.
What You Need
Before You Start
Projects 1 and 2 — you must be able to connect, build a stack, and run it.
Before you start: type your PIN in the box at the top of the page. Your teacher gave you this number. When you finish, press Download to save a local copy of your answers. This does not turn in your work automatically; give the downloaded file to your teacher.

⚠ Wheels Off the Ground --- All Project

Put your robot on a block or a thick book so the wheels spin freely in the air. Every single thing you do in this project happens with the robot up on a block.

A robot that drives off a table lands on the floor. Do not find out.

Try It — Which Way Does It Go?

Think about walking across the room. Your brain does not send one signal to “your body.” It sends a signal to your left leg and a separate signal to your right leg.

The brick works the same way. Two motors, two wheels, two separate commands.

Find the ports

Look at the brick. Across the top edge are four s with letters — A, B, C, D — for motors. Across the bottom edge are four more with numbers — 1, 2, 3, 4 — for sensors. Letters up top, numbers down below.

Any Device, Any Port

Motors get the letters — and among the lettered ports, none is special. A motor works in any of the four, because the brick can tell what is plugged into each one. What matters is that your program and your plugs agree. Our convention for the driving base, from now until the end of the season: left wheel in B, right wheel in C.

The robot is a mirror of itself

Here is something strange, and it matters for everything you do later. The two wheel motors are identical — but they are mounted facing opposite directions, one on each side of the robot.

So “clockwise” does not mean the same thing to both wheels. Spin both motors clockwise and one wheel rolls the robot forward while the other rolls it backward.

The wheel-spin trick

You do not need a program to see this. Connect the app to your brick and open the view that shows the connected devices — you will see a live number for each motor.

On the brick, use the arrow buttons to reach the Brick Apps tab and open Port View. It shows a live number for every port. Arrow over to a wheel motor’s port. Then turn that wheel with your hand, in the direction that would drive the robot forward, and watch its number change on the screen.

PortWhen I spin it forward, the number…So “forward” for this wheel is…
B
C

Both wheels moved the robot’s-forward direction under your hand — but the two numbers changed in opposite ways. What does that tell you about the two motors?

Learn It — The Motor Blocks

The pink Motors category runs one motor at a time. Its main block needs three pieces of information: which motor, which way, and how much.

  • The first dropdown is the — which motor.
  • The arrow is the direction: ↻ clockwise or ↺ counterclockwise — from the motor’s point of view, not the robot’s. That distinction is the whole mirror lesson from a minute ago.
  • The number and unit say how much: rotations, degrees, or seconds.

Speed is a separate block, and it is a percentage — set it once and every motor block after it uses it:

SpeedWhat the wheel does
100Full speed
50About half speed
25Slow and controlled
0Nothing

Two kinds of motor block

Look closely at the shelf and you will find two different ways to run a motor — and the difference between them is the most important idea in this project.

Code / partWhat it means
run A ↻ for 1 rotationsFinishes its own job. The motor turns exactly one rotation, stops, and only then does the next block run.
start motor B ↻Starts and lets go. The motor switches on and the very next block runs immediately — while the motor keeps spinning, until something tells it to stop.
stop motor BThe something. Switches that motor off.

Why you always need the wait

Here is the thing that surprises everyone. Look at this program:

The wheels will not move. Not even a twitch.

The brick switches both motors on, and then — faster than you can blink — reads the next blocks and switches them off again. Remember from Project 2: it moves through blocks far quicker than your eye can follow.

Starting a Motor Is Not "For a While"

Start motor means “run, starting now, until something tells you to stop.” It does not mean “run for a while.” The wait block is what gives it that while — exactly the same lesson as the two pictures in Project 2.

Code / partWhat it means
start motor B ↺Left wheel on. Keep going.
start motor C ↻Right wheel on. Keep going.
wait 2 secondsThe motors are still running this whole time.
stop motor B · stop motor CNow everything stops.

In your own words: what is the wait block actually doing while the motors run?

A stop is not instant

Stop motor switches the power off — but a spinning wheel does not freeze mid-turn. On the ground, the robot coasts a little further before it truly stops. Keep that in the back of your mind: it is why, in the next project, a stop always gets a moment to settle before anything else happens.

Which end is the front?

Your driving base has two driven wheels and one small free-rolling ball — a — that just holds the robot up. The driven wheels are the front; the caster trails along behind.

⚠ Decide Now, Not Later

If half your team calls one end the front and the other half calls the other end the front, your turns will go the wrong way and nobody will be able to see why. Agree it, and write it down: the front of our robot is the end with ___ on it.

Do It — Make It Turn

Robot on the block. Wheels in the air. Every time.

Step 1 — Write your first motor program

Make a new project called Motors — names in the project name, that is your . Build the start-wait-stop program from Learn It: left wheel counterclockwise, right wheel clockwise, wait 2 seconds, both stops. Run it. Watch the wheels.

Did both wheels spin the robot forward? If one went backward, which part of which block do you need to change?

Step 2 — Prove the wait matters

Delete the wait block. Run.

What happened?

Now put it back.

Step 3 — Prove the stops matter

Now delete both stop motor blocks instead. Run. Watch carefully — including what happens after the program looks finished.

What happened this time?

Put them back. Getting into the habit now matters: a robot on a real field with nothing telling its motors to stop is a robot leaving the table.

Step 4 — Explore speed

Add set speed blocks for both motors at the top of the stack. Change the percentage, run, and record what you notice. Keep the wait at 2 seconds every time so it is a fair test.

Speed (%)What I noticed
25
50
75
100

Is speed 100 exactly twice as fast as speed 50? What makes you say that?

Step 5 — Go backward

Flip the direction arrow on both start motor blocks — clockwise becomes counterclockwise and counterclockwise becomes clockwise. Run it.

Step 6 — Make it agree with itself — and see what happens

Now set both motors to the same arrow — both clockwise. Run it. The wheels are in the air, so watch what would happen on the ground.

If this robot were on the floor, what would it do — and why? (Think about the mirror.)

Hold on to this. It is exactly how you will make the robot spin in place in Project 5.

Step 7 — Plan three of your own

Describe the blocks for each of these. Do not build them yet — just write them.

I want to…The block says
Run the left wheel forward at full speed
Run the right wheel forward at 80%
Turn the right wheel exactly 2 rotations
Wait three seconds

Now pick one and actually build and run it, to check you were right.

Score It — Checkpoint

No field mission yet — that starts in Project 4. This checkpoint is about whether your motors are set up correctly and whether you can control them on purpose.

My robot’s setup

Write this down. Every program you write from now on depends on it.

QuestionMy answer
Which port is my left wheel in?
Which port is my right wheel in?
Which arrow is “robot forward” for the left wheel?
Which arrow is “robot forward” for the right wheel?
What speed makes a good steady pace?

Read the program

What will this program do? Write it out before you build it.

My prediction:

Now build and run it. Were you right? If not, what did you miss?

Can you do it again?

Think about it

A teammate says their robot “just doesn’t work” — they run the program and nothing moves. Name two things you would check first, and why.

Nothing in this project told the robot how far to go — only which way to spin and for how long. Do you think that is enough to hit a target on the field? Why or why not?

Next

In Project 4 — Out and Back, the robot comes off the block and onto the field. You will meet the Movement blocks — which handle the mirror for you — drive out of the starting box, park , and drive back. And that scores a real mission.

Download saves a local copy of your answers. It does not turn in your work automatically; give the downloaded file to your teacher.

KIPR · Botball Explorer — Introductory Projects · © KISS Institute for Practical Robotics 1997–2026