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:
11:676ea42afd56
Parent:
9:b72e18f80f49
Child:
44:15de535c4005
--- a/Hardwares/Motor.h	Tue Feb 07 18:20:38 2017 +0000
+++ b/Hardwares/Motor.h	Tue Feb 07 21:58:20 2017 +0000
@@ -6,12 +6,15 @@
 #define MDIR_Forward  1
 #define MDIR_Backward 0
 
+namespace SW
+{
+    class Core;
+}
 
 class Motor{
 
 public:
-
-    Motor();
+    Motor(SW::Core& core);
     
     ~Motor();
     
@@ -30,10 +33,14 @@
     void setDirections(MotorDir dirL, MotorDir dirR);
 
 private:
+
+    SW::Core& m_core;
+    
     DigitalOut m_dirL;
     DigitalOut m_dirR;
     
     PwmOut m_pwmL;
     PwmOut m_pwmR;
     
+    Motor();
 };
\ No newline at end of file