Teachers Notes - Watch out for the following issues when students try to program their robots to follow black line! Pro Preview

After you have discussed the line following task, the students have a few exercises that will lead them to the final line following program. During the exercises students may face the following problems:

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #856
  • 30 Mar 2018
  1.  If the sensor reads black, move the left motor 1 rotation forward. It is important to note that the evaluation happens at the moment the program is started. In order to test the program, you should put the robot over the black line and then run the program. The robot should make one rotation with the left motor. Afterward, put the robot outside of the black line and run the program. The robot should not move in that case.
  2.  If the sensor reads black, move the left motor 1 rotation forward, otherwise move the right motor 1 rotation forward. Here, you have to watch out for the same issue, as in the first exercise.
  3.  Repeat the above program in a loop. When the switch is put inside a loop, the evaluation will be held after each rotation, not constantly. This will result in the robot easily losing the line by passing it. In order to overcome this issue, the move blocks should be set to On, instead of On for Rotation. The next issue that will arise from that change is that the robot will start going forward after the first iteration of the loop. This happens because students do not turn off the first motor before they turn on the second one. When the condition changes, we start the second motor but we do not stop the first one and the robot starts moving straight forward. This could be solved by adding another move block, set to Off, in each of the switch states. So, in the end the program should look like that:

     

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Robotics with LEGO - Level 1.5 - Spy games
  • 56
  • 12:47
  • 135
Image for Line following tasks
  • 2
  • 0
  • 4
  • 3d_rotation 0
Image for Level B2. "Military Technologies". Robotics with LEGO
  • 37
  • 6:37
  • 111
Image for Level B2. "Military Technologies". Robotics with LEGO
  • 37
  • 6:37
  • 111
Image for Lesson 6 - Line Following
  • 5
  • 3
  • 9
  • 3d_rotation 1