David's dead reckoning code for the LVBots competition on March 6th. Uses the mbed LPC1768, DRV8835, QTR-3RC, and two DC motors with encoders.

Dependencies:   PololuEncoder Pacer mbed GeneralDebouncer

Files at this revision

API Documentation at this revision

Comitter:
DavidEGrayson
Date:
Thu Mar 13 17:49:43 2014 +0000
Parent:
37:23000a47ed2b
Child:
39:b19dfc5d4d4b
Commit message:
The final version of the code that was used for the competition.;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Mar 06 05:11:46 2014 +0000
+++ b/main.cpp	Thu Mar 13 17:49:43 2014 +0000
@@ -183,8 +183,13 @@
     while(!button1DefinitelyPressed())
     {
         updateReckonerFromEncoders();
-    }   
+    }
     reckoner.reset();
+    while(button1DefinitelyPressed())
+    {
+        updateReckonerFromEncoders();
+    }
+    wait(0.2);
 }
 
 // Keep the robot pointing the in the right direction (1, 0).