How can we interrupt the loop? How can the program know which loop to interrupt?

To access the full video please subscribe to FLLCasts.com
- #1121
- 15 Feb 2019
Most programs are executed in an infinite loop. In this lesson we will focus on a new block which interrupts the loop without programming it how much it should repeat in advance. We are going to use the Loop Interrupt Block for that purpose. This is the last block in the orange palette.
The only thing we have to set is the name of the loop we want to interrupt. This is done by clicking on the upper right corner where we usually set the ports. Then, from the drop-down list, we choose the name corresponding to the loop we want to interrupt.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Robotics with LEGO - Level 3.0 - Security systems
This is the fifth level of the Robotics with LEGO curriculum for students in fifth to twelfth grades.
In this level students will learn how to work with data measured by the sensors. The concept of Algorithm is introduced and the programs perform calculations without knowing the values beforehand. The programming blocks transfer data between each other via data wires. The robots are designed to address the problems of security systems. Variety of alarm systems are built and the physical principles of different security methods are considered.
- 50
- 1:03
- 213

Lesson 2 - Weighing security stand
Weighing plate, using weight change block
The sensor of the robot from the previous lesson was binary. This means there was only one state possible – either there is an object or there is no object. Therefore, it was very easy to press the plate, take the exhibit and put a stone instead. And the system could not detect us anyway. That is why now we have to think of something better in order to protect the valuable exhibits.
A clever solution is to have a robot which “senses” each change in weight. If the weight is greater, this will mean there is someone pressing the plate and the system should trigger the alarm. If the weight becomes lower, this will mean someone has stolen the exhibit and the alarm should also go off.
- 8
- 5
- 15
- 3d_rotation 1

Robotics with LEGO - Level 4.0 - Kinesthetic and Memory Game (in development)
The seventh level of the Robotics with LEGO curriculum for students in sixth or seventh grade.
In this level, student develop a memory training game. The player must remember series of actions like press a button, shake a pole, pull a lever, show one of many colors. In order to program the game, students use many variables and modify their states. Students create their own custom sounds and images, in order to reflect their own personality in the game. In the end of the level, the game stores top scores even after a full shut down with the help of text files.
- 59
- 2:58
- 200