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:
37:23000a47ed2b
Child:
40:6fa672be85ec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/logger.h	Thu Mar 06 05:11:46 2014 +0000
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <stdint.h>
+
+#define LOGGER_SIZE 2000
+
+struct LogEntry
+{
+    //int16_t cos;
+    //int16_t sin;
+    int16_t x;
+    int16_t y;   
+};
+
+class Logger
+{
+    public:
+    Logger();
+    void log();
+    void dump();
+    bool isFull();
+    
+    LogEntry entries[LOGGER_SIZE];
+    
+    // The index of the next entry to write to.
+    int32_t entryIndex;
+};
+