Filterd vier EMG signalen en zend naar HIDscope

Dependencies:   MovingAverage mbed HIDScope biquadFilter

Files at this revision

API Documentation at this revision

Comitter:
aschut
Date:
Sat Apr 20 20:08:23 2019 +0000
Parent:
30:0988a637a342
Commit message:
Code om 4 EMG signalen te filteren en met hidscope af te lezen

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 0988a637a342 -r 4011beb5a03c main.cpp
--- a/main.cpp	Tue Apr 16 10:56:11 2019 +0000
+++ b/main.cpp	Sat Apr 20 20:08:23 2019 +0000
@@ -312,45 +312,16 @@
 DigitalOut  led(LED1);
 
 
-void sample()
+void sample()               //Send to HIDscope
 {
              
-    /*   
-    scope.set(0, emg1.read() );
-    scope.set(1, emg1_filtered);
+      
+    scope.set(0, emg1_filtered );
+    scope.set(1, emg2_filtered);
     scope.set(2, emg3_filtered );
     scope.set(3, emg4_filtered);
     
-    scope.send();
-    */
-    if (Duim == 1){     //groen
-    led1 = 0;
-    }
-    else {
-    led1 = 1;
-    }
-    if (Bicep == 1){        //rood
-    led2 = 0;
-    }
-    else {
-    led2 = 1;
-    }
-    if (Dorsaal == 1){      //blauw
-    led3 = 0;
-    }
-    else {
-    led3 = 1;
-    }
-    if (Palmair == 1){
-    led1 = 0;
-    led2 = 0;
-    led3 = 0;
-    }
-    else {
-    led1 = 1;
-    led1 = 2;
-    led1 = 3;
-    }
+    scope.send(); 
 }