This robot is very cool because it goes forward until it senses an object. It then stops, turns the front wheels one way and then the other to see which path is longer. It then chooses the longer path. I really like this robot!!!!!!
Here's what the program looks like. I haven't commented the code yet. Sorry about that.
Thursday, February 26, 2009
Saturday, February 21, 2009
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".
Here's what the code looks like:
Wednesday, January 21, 2009
When you put the edge finder in the middle of the table, it moves forward until it finds the table edge (using the ultrasonic sensor). Then it moves in reverse to the center of the table, then it turns randomly, and repeats that two more times. The ultrasonic sensor works by sending out a very hi pitched sound that you can't hear. Then the sensor times how long the sound takes to get to an object in front of it and back.
Here's what the program looks like: