Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Adafruit-16-Ch-PWM-Servo-Driver HCSR04 PID PololuQik2 QEI Sharp mbed-rtos
Fork of theRobot by
Revision 7:8fb4204f9600, committed 2014-03-19
- Comitter:
- tashworth
- Date:
- Wed Mar 19 17:08:25 2014 +0000
- Parent:
- 6:75259c3306dd
- Child:
- 8:77a57909aa15
- Commit message:
- 3-19-2014
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Mar 19 17:05:35 2014 +0000
+++ b/main.cpp Wed Mar 19 17:08:25 2014 +0000
@@ -160,10 +160,18 @@
servoPosition(posNum);
}
-
+ /********************************
+ MAIN WHILE LOOP FOR COMPETITION
+ *********************************/
while(1) {
switch (state) {
-
+
+ /**************************************************
+ * STAGE 0
+ *
+ * - START OF THE COMETITION
+ *
+ **************************************************/
case START :
myled1 = 1;
wait(5);
@@ -308,7 +316,7 @@
//******* TODO ********//
//*********************//
// CODE TO NAVIGATE ROW3
-
+
//goes to appropriate rig
if(shape_detected == 1) {
state = NAVIGATE_TO_SQUARE_RIG;
@@ -345,12 +353,12 @@
*
**************************************************/
case RIG_ALIGN:
-
+
//*********************//
//******* TODO ********//
//*********************//
// CODE TO ALIGN ROBOT WITH RIG
-
+
servoPosition(ORIENT_TOOL);
wait(1); //wait for servos to settle
state = INSERT_TOOL;
@@ -364,7 +372,7 @@
* - win contest
*
**************************************************/
-
+
case INSERT_TOOL:
//*********************//
//******* TODO ********//
