
To access the full video please subscribe to FLLCasts.com
- #2318
- 30 Jul 2024
In this lesson, students will learn to use the wait until blocks with the color sensor. The task is simple: the robot should stop at the first black line. Here's an example program:
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Level B2 - Introduction to Robotics Competitions - Robotics with LEGO SPIKE Prime
This is the fourth level of the LEGO Robotics Curriculum for students in second, third, or fourth grades.
Competitive Introduction Level: Each lesson has a theme related to various LEGO robotics competitions. Students learn about FIRST LEGO League, Line Following, and Sumo Wrestling. A new color sensor is introduced, and students use forever loops, wait until commands, and if/else statements in new ways.
- 21
- 1:03
- 60

Lesson 2 - Detecting a line
Introduction
In this lesson, we will program the robot to stop at a line. This technique is used in multiple competitions, such as Line Following, FLL, and Sumo.
Can you think of other scenarios where a robot might need to detect lines? What are the benefits in those situations?
snimka
A robot can, for example, detect street markings to avoid getting lost on the road. In FLL, detecting lines is particularly important so the robot knows exactly where it is on the field. Every robot has a small margin of error; each time we move a motor, it might move a bit more or less than intended. You have probably seen this in action, but in these lessons, we create small programs where this error isn't a big problem. However, in FLL, programs are often very long, and this error accumulates until the robot doesn't move correctly at all. That's why we use alignments, usually to walls or lines. When the robot aligns, it corrects most of this error and can continue accurately on its path.
- 2
- 4
- 10
- 3d_rotation 1