Chapter 10. Tracking the Line

This is the last chapter of our book and it outlines the construction and programming of the line-follower robot. We have already made the robot aware of its environment via the color sensor and capable of locomotion using the differential drive. It is now time to bring these components together and program the robot to track a colored line/path.

In this chapter, we will cover the following topics:

  • Writing a Controller to integrate color sensor with differential drive
  • Enhancing the code step by step, adding and explaining the functionality
  • Ending up with a fully functional, autonomous Line-following robot

The objective

The objective of a Line-follower robot is to detect and follow a line/path drawn or placed on the floor. As explained in Chapter 8, The Line-follower Robot, the robot we are constructing is designed for a path that consists of straight line segments with no crossovers and no sharp corners.

As an example, consider the following path that I used to test my robot:

The objective

The path has been designed to test the robot's ability to handle all sorts of corners: acute, obtuse, and right-angled ones. A correctly programmed Line-follower robot will have no difficulty in traversing the path from start to finish in either direction.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.47.221