O'Reilly logo

Lego Mindstorms EV3 Essentials by Abid H. Mujtaba

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interrupting the motion

Now that the color sensor is correctly detecting the path (and lack thereof), it is time to integrate this with the differential drive and use the sensor to interrupt the motion of the robot. This is a crucial bit of functionality. It integrates the two major components of the robot and is a proof-of-concept of the line-follower robot in general.

To test the integration, create a small straight line segment of the path. (I achieved this by placing a small segment of red tape on the floor to form a straight line.) Place the robot at the start of the path segment with its color sensor directly on top of the path. Our objective is to run the program and have the robot move forward, coming to a stop when the path ends (the robot ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required