
To access the full video please subscribe to FLLCasts.com
- #2322
- 31 Jul 2024
In this lesson, students will learn how to program the robot to follow a line using if/else blocks. The algorithm is similar to the last lesson - the ducky line following.
This lesson is a great opportunity to teach students the difference between verbally expressing a task and how that relates to programming it. For example, in the last lesson, they used wait until blocks, so the task was to program the robot to turn left until it reaches black, then turn right until it reaches white. In this lesson, the robot turns left if it is on black, else it turns right.
The main task is a bit complex, so students may need help. The most common mistake is forgetting to stop the inactive motor, causing the robot to just go forward.
Here's what the program should look like:
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 6 - Line Following Part 2
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.
- 4
- 6
- 7
- 3d_rotation 1