|
Explore TEAMS!
|
Student /
PracticalExamJonHPractical Exam Presentation
I am very proud of the code that i am presenting to you. This code has one main function in our quest for eggs. From the point in which an egg is detected just outside the create, it will be able to either put our ball in the goal, or toss the opposing ball away. This code has one main function in our quest for eggs. From the point in which an egg is detected just outside the create, it will be able to either put our ball in the goal, or toss the opposing ball away. I used a code that will use the advanced button like a flip switch. If the advanced button is unpressed, the robot will try to score with the blue ball. If advanced button is pressed, it will try to score with the yellow ball. I have attached a ""ball thrower" onto a servo motor, which can drop or raise the paddle. When in the raised position, the robot can move around and sense the course freely. When detecting a nearby ball, the robot will drop the paddle, and rotate 360 degrees. This will get the ball into the corner of the thrower. Next, the create will detect the color of the ball. It will use this value later. The robot will procede to rotate (at maximum speed), until it faces he goal. (it will know this because a light sensor in the front will see the lights) If the color of the ball is desired, it will stop rotating, launching the ball into the goal. If the color of the ball is undesired, the robot will rotate an extra 180 degrees, then stop. This will send the ball reeling in the opposite direction. After launching the ball, the servo will bring the paddle up, and the robot will be ready to relocate. |