How Do Robots See Lines? (Black vs. White)

Line following is the first big skill in FLL. How does the robot know where the line is? It comes down to Light and Dark.

How Do Robots See Lines? (Black vs. White)

In FIRST LEGO League, there are thick black lines on the white mat. Robots use them as “Highways” to get to missions reliably. But how does the robot stay on the road?

Reflected Light

The robot’s eye (Color Sensor) is basically a flashlight and a camera.

  1. Shine: It shines a Red Light on the floor.
  2. Reflect: It measures how much light bounces back.
    • White Paper: Bounces ALMOST ALL light back (100% Brightness).
    • Black Line: Absorbs the light. Bounces NOTHING back (0% Brightness).

The “Wiggle” Walk

A simple robot code might say:

  • “If I see White (too far right) -> Turn Left.”
  • “If I see Black (too far left) -> Turn Right.”

The robot wiggles back and forth, constantly correcting itself perfectly along the edge of the line. It looks a bit silly, like a penguin waddling, but it works! This is the secret to getting a “Perfect Score” in the robot game: Don’t guess where you are driving—follow the signs!

Explore FIRST® Robotics

FIRST® (For Inspiration and Recognition of Science and Technology) is a global robotics community preparing young people for the future. Discover the ultimate sport for the mind and see how you can get involved in STEM and robotics!

Learn More at firstinspires.org