Cleaner version

Dependencies:   HIDScope MODSERIAL Motordriver QEI Servo mbed

Fork of The_Claw_with_EMG_Control_PID by Meike Froklage

Revision:
9:90227be52903
Parent:
8:ac4e5afbdbcd
Child:
10:31e4c3d71ee6
--- a/main.cpp	Wed Nov 02 15:27:34 2016 +0000
+++ b/main.cpp	Wed Nov 02 15:30:54 2016 +0000
@@ -165,7 +165,6 @@
 
 // set the threshold value for the filtered signal
 //if the signal exceeds this value the motors will start to rotate 
-const double threshold_value_left= 0.08;
 const double threshold_value= 0.08;
 
 
@@ -293,11 +292,7 @@
             if(led_r == LedOn){
                 num_turned_on_0++;
             
-                if(btn && btn2) {                  
-                    Arm.speed(0) == 0;
-                    Cart.speed(0) == 0;                           
-                
-                }else if (btn && !btn2) {
+                if (rlf_y > threshold_value) {
                     if(position_cart <= -105){                                  //If the cart is at the right side, it stops
                     Cart.stop(1)==1;
                     
@@ -314,7 +309,7 @@
                     Cart.speed(cart_speed)==cart_speed;
                     }
          
-                }else if (!btn && btn2) {
+                }else if (llf_y > threshold_value) {
                     if(position_cart >= 105){                                   //If the cart is at the left side, it stops
                     Cart.stop(1)==1;