Line follower unit test

The Jupyter notebook for the test is ./CH2-uniTests/di-lineFollower/lineFollower_libraries.ipynb. This notebook also shows you both the easy library, di_sensors.easy_line_follower, and the advanced version, di_sensors.line_followerin action.

When the sensor reports center, this is because the robot is well centered on the black line, as shown in the next image. This means that the two external emitter-receiver pairs report white, while the pairs between them report black:

When the sensor reports left, it means that the line is slightly to the left of the robot, as shown in the following photo. This means that the left-most pair reports black, the central ones black, and the rest white:

If the robot ends up completely off the line, all the pairs report white and the line follower throws white overall. The opposite is also true: if all the pairs report black, it may be because the black line is too wide or the robot has been placed on a dark surface.

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

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