Jitse Giesen / Mbed 2 deprecated master

Dependencies:   biquadFilter mbed MODSERIAL

Revision:
10:a8a07e4ce85c
Parent:
8:8e7c928aadc6
Child:
11:1f57061dadfa
--- a/main.cpp	Thu Nov 02 18:40:51 2017 +0000
+++ b/main.cpp	Thu Nov 02 19:16:02 2017 +0000
@@ -125,6 +125,7 @@
     t_thresholdR.start();
     currentTimeTR = t_thresholdR.read();
     
+    
     if (currentTimeTR <= 1) {
            
         emgBRfiltered = bqChainTR.step( emgBR.read() );   //Notch+High-pass
@@ -135,6 +136,7 @@
         }
     emgBRmeanMVC = emgBRsum/numsamples; 
     thresholdBR = emgBRmeanMVC * 0.20;
+
        
     //pc.printf("ThresholdBR = %f \n", thresholdBR);
 }
@@ -156,13 +158,15 @@
         
     emgBLmeanMVC = emgBLsum/numsamples;
     thresholdBL = emgBLmeanMVC * 0.20;
- 
+    
+    
 }
  
 // EMG sampling and filtering
 
 void EMG_sample()
 {
+
     //Filtering steps for the Right Biceps EMG
     emgBRfiltered = bqChain1.step( emgBR.read() );   //Notch+High-pass
     emgBRrectified = fabs(emgBRfiltered);            //Rectification
@@ -210,10 +214,10 @@
         led_B=1;
         led_R=0;
         while(true){
-        button.fall(ledtX);    
-        /*if (emgBRcomplete > thresholdBR) {
+        //button.fall(ledtX);    
+        if (emgBRcomplete > thresholdBR) {
         ledtX();
-        }  */                     
+        }                       
         t.start();
         huidigetijdX=t.read();
         if (huidigetijdX>2){
@@ -256,10 +260,10 @@
     led_B=0; 
     led_R=1;
     while(true){
-    button.fall(ledtY);  
-    /*if (emgBRcomplete > thresholdBR) {
+    //button.fall(ledtY);  
+    if (emgBRcomplete > thresholdBR) {
         ledtY();
-        }*/
+        }
     t.start();
     huidigetijdY=t.read();
     if (huidigetijdY>2){