SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.

Dependencies:   TSI USBDevice mbed-dev

Fork of SmartWheels by haofan Zheng

Revision:
15:eb6a274b3dfb
Child:
65:295c222fdf88
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Hardwares/WheelEncoder.h	Tue Feb 14 19:51:57 2017 +0000
@@ -0,0 +1,34 @@
+#pragma once
+
+#include <mbed.h>
+
+namespace SW
+{
+    class Core;    
+}
+
+class WheelEncoder
+{
+public:
+    WheelEncoder(SW::Core &core);
+    
+    ~WheelEncoder();
+    
+    void Update(float deltaTime);
+    
+private:    
+
+    void pulseInRRight();
+    
+    void pulseInRLeft();
+
+    SW::Core& m_core;
+    
+    InterruptIn m_intRL;
+    
+    InterruptIn m_intRR;
+    
+    Timer m_rrightTimer, m_rleftTimer;
+    
+    float m_rrDuration, m_rlDuration;
+};
\ No newline at end of file