|
Explore TEAMS!
|
Student /
WebsterPracticalExamCodeSummaryCode SummaryOnce the play button is pressed, the robot drives until the distances sensors pick up on something, at which time the robot turns as needed to stop in front of the object. The servo arm lowers part way and a touch sensor is used to tell if the robot has found a ball or the wall. A wall is long and will therefore touch the sensor while a ball will not. If the robot determines it had found a wall it raises the arm again, turns and resumes searching. If it has found a ball, the robot lowers the arm the rest of the way and captures the ball. Once a ball is captured the robot waits a moment before raising the arm and begins to wait for the play button to be pressed again. |