Quote:
Originally Posted by yarb65
How did you get the Robot to "follow" the green light!
All i can do is get the camera to follow not the whole robot....
|
You need to think of the information the camera is giving your robot at this point. The camera is locked onto and pointing at the target.
You know how how far to the left/right the pan is. With this information your robot should be able to figure out which way it needs to turn. (ie if the camera unit is facing off to the left, that's where the light is and your robot needs to turn left).
Last year I had the kids make a simple "find the light" program that was basically
if(camera is off to the left)
turn left slowly
else if(camera is off to the right)
turn right slowly
This wouldn't make for a great "follow" program in competition, but it's a great place to start at and understand what you're working with.