|
Explore TEAMS!
|
Student /
AllisonsPracticalRobotics Practical: Finding and Capturing an Egg![]() GoalThe purpose of my practical was to code the part of my egg hunt that involved searching for the egg. My goal was for the robot to be able to successfully locate and capture an egg in the quickest and most efficient way possible. Debugging My CodeAs part of the debugging process, I created two debugging codes. When I pressed the play button, the cricket display would show my actual distance readings. When I pressed the advance button, the cricket display would show me the difference between each of my sensor readings. I also used LEDs and beeps to signal where I was in regards to my program. ![]() Lessons Learned
Practical SummaryAfter much trial and error, hours of work and frustration, and help from Mr.Rhine, my partner, and others, I was finally able to successfully write a code that finds and captures an egg. My original strategy for doing this was to use my "Wimp" mode as a search pattern to look for the egg. I was going to have the robot drive forward and turn 90 degrees while taking sensor readings to maneuver around the court while simultaneously searching for an egg. I changed my plan, however, after discussing with Mr. Rhine about what was the easiest, and fastest way of finding the egg. My new goal became creating a program that recognizes the difference between sensor readings as the robot drives in a circle to detect any outliers that would signal that an egg was detected. Here's more on how my strategy works: As the robot rotates 360 degrees while detecting the wall, the distance from the wall increases by less than 4cm per degree. In fact, the change for the most part is so slight, that when an obstacle (in this case an egg) is detected, the change in distances readings jumps to greater than 8cm. When detected by the robot, this significant change can be used to find an egg. Once the egg is found, my next goal was to drive forward and capture it. Coding this part of the code was extremely easy, because it only involved driving forward until the egg was close enough to be caught in the servo motor. Overall, my code was a success and the robot was able to find and capture an egg. Some things that I would have improved on, if time permitted, would have been using greater speed to look for the egg. Also, I would have created a better base for my distance sensor. The original base that I was using got in the way of the signals and gave me faulty distance readings. One final thing that I would have done to improve my code would have been to add bump sensors to keep my robot away from corners and the walls of the court. ![]() |