David's line following code from the LVBots competition, 2015.

Dependencies:   GeneralDebouncer Pacer PololuEncoder mbed

Fork of DeadReckoning by David Grayson

Revision:
45:e16e74bbbf8c
Parent:
44:edcacba44760
Child:
46:f11cb4f93aac
--- a/turn_sensor.cpp	Wed Apr 15 19:14:39 2015 +0000
+++ b/turn_sensor.cpp	Wed Apr 15 19:19:19 2015 +0000
@@ -19,6 +19,7 @@
             // error
             return;
         }
+        rate = gz;
         
         // First figure out how much time has passed since the last update (dt)
         uint16_t m = timer.read_us();
@@ -40,8 +41,4 @@
         // = 14680064/17578125 unit/(digit*us)
         angleUnsigned += (int64_t)d * 14680064 / 17578125;
     }
-    else
-    {
-        angleUnsigned += 5;
-    }
 }
\ No newline at end of file