first commit

Dependencies:   mbed

Dependents:   ibeacon

Fork of BLE_WallbotBLE_Challenge by JKSoft

Revision:
2:3c406d25860e
Parent:
0:76dfa9657d9d
diff -r a86c84ead24a -r 3c406d25860e TB6612FNG/TB6612.cpp
--- a/TB6612FNG/TB6612.cpp	Tue Nov 18 04:28:02 2014 +0000
+++ b/TB6612FNG/TB6612.cpp	Fri Feb 20 00:07:48 2015 +0000
@@ -43,8 +43,11 @@
 //   float speed -1.0 - 0.0 - 1.0
 float TB6612::speed(float speed) {
     
+    
+    
     if( speed > 0.0 )
     {
+        if( speed > 0.7)    speed = 0.7;
         _pwm = speed;
         _fwd = 1;
         _rev = 0;
@@ -52,6 +55,7 @@
     }
     else if( speed < 0.0 )
     {
+        if( speed < -0.7)    speed = -0.7;
         _pwm = -speed;
         _fwd = 0;
         _rev = 1;