High Level Logic

Algorithm:main(){1. Calibrate the servo arm, and the initial location of the robot2. Wait for start light3. Drive to lever down function4. Align to the levers function5. Flip lever function
6. Wait five seconds7. Flip lever up function
8. Drive to luggage station and drop off luggage.9. Drive to ticket station light function10. Determine what light is shown function11. Align with ticket station button function12. Press ticket station button function13. Drive to passport station function14. Align with the stamp lever function.15. Flip the stamp lever function16. Drive and run into final button function}
The logic for the main function is pretty straight forward. We plan on having functions for completing each part of the course. Some attributes of each function will be the same, or very similar, to others. An example of this would be following a line to a certain point, or using the servo arm to flip the levers and the passport stamp. There will be smaller functions within the functions above that will be called for simple things like driving forward, backward, or making turns. Having the main tasks all split into functions will make the code more organized and easier to read and work with.