AmpleRobots

Beginner

Project: Build a Line-Following Robot

Bring everything together: build, program and test a robot that follows a black line on its own, then improve it.

In this project your robot will follow a black line on a light floor, a classic first challenge in robotics competitions around the world.

Set up a track: use black electrical tape on a light floor or a large sheet of paper. Start with gentle curves; sharp corners come later.

Mount two line sensors at the front of the robot, one on each side of the line. The rule is simple: - Both sensors see the light floor: the line is between them, so drive straight. - The left sensor sees the line: the robot has drifted right, so turn left. - The right sensor sees the line: the robot has drifted left, so turn right.

Write the program using what you learned in lesson 4, then test it. Expect it to wobble at first. That is normal, and fixing it is real engineering work.

Improve it like an engineer, changing one thing at a time: - Slow the robot down: easier to follow, but slower to finish. - Turn more gently: smoother, but it may lose the line on sharp curves. - Add a third sensor in the middle for better control.

Record your best lap time and what you changed to get it. Comparing results and sharing what worked is how robot builders learn from each other.

Next steps: add the distance sensor from lesson 4 so your robot stops when something blocks the line.