1/14/08

Lego NXT line follower

A simple LEGO NXT robot that uses the light sensor to follow a black line.
The program is pretty simple:
  1. Go forward infinitely at 50% power
  2. Until the light sensor reads greater than 50%
  3. Then stop the left wheel
  4. And move the right wheel forward 10 degrees
  5. Repeat
This program makes the robot inch forward until it's moved off the black line. Then it moves to the left by 10 degrees and inches forward again. It assumes the line is a circle, and that the robot is positioned inside the circle, so it will traverse the circle in a counter-clockwise rotation.

You can download my program if you'd like.


No comments:

Post a Comment