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

Chapter 9. Sensing the Path

We have already made the robot capable of locomotion, and now the time has come to make it aware of its environment. Since the line-follower robot is tasked with detecting and following a colored line/path, this entails the incorporation of the color sensor into the robot.

In this chapter, we will cover the following topics:

  • Using LeJOS to gain access to the color sensor
  • Extending the abilities of the EV3ColorSensor class to better suit path detection
  • Using the color sensor to interrupt the motion of the robot when the path ends

Exploring the color sensor

It's time to give the line-follower robot the ability to detect the presence or absence of the path/line. We will start with a minimal configuration that will make us familiar ...

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