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

Revision:
4:1b20a11765c8
Parent:
3:59c80d4b4bf2
Child:
5:01ad080dc4fa
--- a/main.cpp	Thu Feb 20 22:24:32 2014 +0000
+++ b/main.cpp	Thu Feb 20 22:59:28 2014 +0000
@@ -1,6 +1,7 @@
 #include <mbed.h>
 #include "PololuEncoder.h"
 #include "Pacer.h"
+#include "motors.h"
 
 DigitalOut led1(LED1), led2(LED2);
 
@@ -30,12 +31,17 @@
     wait_us(50);
     encoder1.init();
     encoder2.init();
+    
+    motors_init();
+
+    motors_speed_set(5, 55);
 
     Pacer reportPacer(250000);
     Pacer blinkPacer(200000);
     uint32_t eventCount = 0;
     uint32_t count = 0;
-    while(1) {
+    while(1)
+    {
         while(encoderBuffer.hasEvents())
         {
             PololuEncoderEvent event = encoderBuffer.readEvent();