Saturday, February 21, 2009

Tag bot


I really like this robot because it is the first robot I programed to play a game. This robot goes forward until it senses an object. Then it goes backwards. If it does not sense an object for three seconds, it turns and goes in a new direction. As this is going on, you try to tag the robot's light sensor with a beam of light from a flashlight. When you tag the robot, the robot makes a beeping noise. If you tag the robot for a half a second, it will stop then say "game over". video

Here's what the code looks like:



No comments:

Post a Comment