Racing Robots Session

Dependencies:   m3pi mbed

Fork of racing_robots by Nico De Witte

Files at this revision

API Documentation at this revision

Comitter:
sillevl
Date:
Thu May 19 13:16:14 2016 +0000
Parent:
7:a72215b1910b
Commit message:
add xbee support to racing robots library

Changed in this revision

robot_logic.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/robot_logic.cpp	Wed Feb 25 15:56:14 2015 +0000
+++ b/robot_logic.cpp	Thu May 19 13:16:14 2016 +0000
@@ -3,9 +3,9 @@
 // Some defines
 #define MAX_SPEED 100
 #define MAX_SENSOR 100
-#define MAX_REAL_SPEED 0.75
+#define MAX_REAL_SPEED 0.3
 
-#define MIN 0
+#define MIN -MAX_SPEED
 
 // Static scope variables
 static m3pi m3pi;
@@ -60,6 +60,7 @@
         left = MIN;
     else if (left > MAX_SPEED)
         left = MAX_SPEED;
+        
     m3pi.left_motor(MAX_REAL_SPEED*left/MAX_SPEED);
     m3pi.right_motor(MAX_REAL_SPEED*right/MAX_SPEED);
 }