Every program is comprised of a series of instructions Pro Preview

Let's make a program that moves the robot forward and then backward.

  • #378
  • 04 Feb 2017
  • 2:45

A program as a series of instructions

Drag and drop a second block to the programming canvas of the software. You can add new blocks either before, or after existing blocks.
A computer program is a series of instructions or commands that are executed one after the other.

How to delete a wrong block

If you need to remove a block, you could drag it back to the palette section and drop it there. The delete button will do the same if you prefer to use the keyboard.


Our robot moves forward and we can also program the robot to move backward. Let me just find my program.

Like this. Now, in this video we must improve on the program so that it moves forward, backward, forward, backward, etc. We'll set this as a challenge. We'll show you part of the solution and then we'll leave you to experiment with the different tasks. So, let's first implement a program so that it moves forward and backward.

This here is a program for moving backward. You see -1 as rotations and we can drag and drop one more block into the program. We can drop the block as a last block or as a first block. Let's just drop it as a first block. Now, this program will make the robot move forward for one rotation backward for -1 rotation. And that's important because this is what programming looks like. You just add a number of blocks in a series and you reach a behavior of the robot. In this case forward, backward. Let's download it and run it.

Again, I'll have to find it.

Forward, backward. What you need to do from here is to just add more blocks to the program and configure their settings. And you reach a final program that makes the robot moves like a Yo-yo. And you'll need.. You have to find out how many blocks you'll need. Now, it's possible that you make a mistake. Like clicking on another block and even placing it. You can delete this block. You just drag and drop this block back to the pallet. Like this.

Or you can just use the Delete key. You just select the block and press delete. So, the task from here is to implement the Yo-yo. To do it on your own by adding more blocks to the program.

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for EV3 Phi. Introduction to robotics with LEGO Mindstorms
  • 92
  • 220:20
  • 36
Image for Instructors Remote Training
  • 136
  • 280:11
  • 156
Image for How to make the robot move
  • 24
  • 0
  • 11
  • 3d_rotation 0
Image for Robotics with LEGO - Level 1.0 - Adventure in Space
  • 126
  • 123:52
  • 150
Image for Lesson 1 - Moving like a Yo-Yo
  • 19
  • 4
  • 9
  • 3d_rotation 1
Image for Level A1. Introduction. Robotics with LEGO
  • 142
  • 133:42
  • 187
Image for Lesson 2 - Yo-yo challenge
  • 18
  • 3
  • 8
  • 3d_rotation 1