So far you have programmed the robot to move after the touch sensor was pressed.
Now we will make the robot start moving while the touch sensor is still pressed and then we’ll make the robot stop.

To access the full video please subscribe to FLLCasts.com
- #622
- 20 Aug 2017
Wait until another command is given
From now on the robot will often have to move until something happens. This something is usually a sensor which detects a specific condition.
First, we will show you the so called unlimited forward movement we want the robot to move forward for an unknown period of time - it could be from very short time to eternity. Nevertheless, we cannot set such numbers in the program which is why we will turn the motors on until another command is given:
Try out this program. The motors are turns on and the robot is waiting for another command in order to move to the next block. The next block is a 10 sec wait block. In these ten seconds the motors will be turning. Then the program ends which will make the motors gradually stop.
There is CATCH here: the block for unlimited movement cannot be the last block of the program. If it is the last block, the motors will turn on for a little while, the program will end and then the motors will stop.
In order to stop the motors, we need a block for turning the motors off:
This three-block construction (a block for unlimited movement, a block for waiting for something and a block for stop is very common and very important in the robotics classes.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Robotics with LEGO - Level 1.0 - Adventure in Space
The first level of the Robotics with LEGO curriculum for students in fifth to twelfth grades.
Various constructions with robots are built. Learn how to control the motors so that the robot navigates around the Moon and Earth in various ways. Getting to know the first two sensors. The robot can feel its surroundings with the help of the Touch sensor and avoid obstacles.
The Ultrasonic distance sensor can help the robot avoid obstacles. Students work with concepts like loop, degrees and medium motor. Robots can now do two different actions at the same time - while solving missions on a field, the third motor clears detected obstacles.
- 126
- 123:52
- 150

Level A1. Introduction. Robotics with LEGO
Introduction to robotics - The first level of the Robotics with LEGO curriculum for students in second, third or fourth grades. A journey in space, with robots. Various constructions with robots are built. Learn how to control the motors so that the robot navigates around the Sun, the Moon and Earth in various ways. Getting to know the first of the sensors. The robot can feel its surroundings with the help of the Touch sensor and avoid obstacles.
- 142
- 133:42
- 187
Lesson 6 - Touch sensor
In the next lesson we usually do a graduation. Write down your impressions about the students and the reasons why they have the grades you gave them.
- 10
- 3
- 6
- 3d_rotation 0