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:
44:15de535c4005
Parent:
11:676ea42afd56
Child:
46:a5eb9bd3bb55
--- a/Hardwares/Motor.h	Mon Mar 27 22:09:22 2017 +0000
+++ b/Hardwares/Motor.h	Wed Mar 29 21:19:27 2017 +0000
@@ -3,8 +3,8 @@
 #include <mbed.h>
 
 #define MotorDir unsigned char
-#define MDIR_Forward  1
-#define MDIR_Backward 0
+#define MDIR_Forward  0
+#define MDIR_Backward 1
 
 namespace SW
 {
@@ -20,11 +20,11 @@
     
     void Update(float deltaTime);
     
-    void setLeftSpeed(float speed);
+    void setLeftSpeed(const float speed);
     
-    void setRightSpeed(float speed);
+    void setRightSpeed(const float speed);
     
-    void setSpeeds(float speedLeft, float speedRight);
+    void setSpeeds(const float speedLeft, const float speedRight);
     
     void setLeftDirection(MotorDir dir);