EMG filtering; highpass, notch, abs, moving average

Dependencies:   HIDScope MODSERIAL- mbed-dsp mbed

Files at this revision

API Documentation at this revision

Comitter:
Hooglugt
Date:
Tue Oct 07 12:34:32 2014 +0000
Parent:
33:a78ec776dfd5
Child:
35:c3182df00ec8
Commit message:
reset_looper "groen" gemaakt, script functioneerde niet meer goed - wss doordat triceps groter dan 0.8 was, wanneer dit niet bedoeling was (door bewegingartefacten)

Changed in this revision

Project_main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Project_main.cpp	Tue Oct 07 11:54:53 2014 +0000
+++ b/Project_main.cpp	Tue Oct 07 12:34:32 2014 +0000
@@ -40,6 +40,9 @@
     if(pc.rxBufferGetSize(0)-pc.rxBufferGetCount() > 30) { //VRAAG: praktisch nut hiervan? print emg value wanneer buffercount groter dan 30 is
         //pc.printf("%u\n",emg_bivalue);
     }
+    
+    /* EMG-singaal van biceps en triceps worden hier gefilterd*/
+    
     scope.set(0,emg_bivalue);
     scope.set(1,emg_bifloat.read());
     scope.set(2,emg_trivalue);
@@ -47,6 +50,7 @@
     scope.send();
 }
 
+/*
 void resetlooper() // VRAAG: wat gebeurt er wanneer en resetlooper en looper tegelijkertijd gecalled worden?!
 {
     if(emg_trifloat.read()>0.8 && direction != 0) { //dit is alleen mogelijk wanneer directionchoice is gemaakt
@@ -55,6 +59,7 @@
         pc.printf("reset ");
     }
 }
+CONSTANTE RESETS DOOR BEWEGINGSARTEFACTEN*/
 
 int main()
 {
@@ -62,9 +67,7 @@
     emg_bifloat.period_ms(2); //sets period for the PWM to the emgfloat PTD4
     emg_trifloat.period_ms(2);
     log_timer.attach(looper, 0.001); // The looper() function will be called every 0.001 seconds (with the ticker object)
-    reset_timer.attach(resetlooper, 0.1); //
-
-    /* EMG-singaal van biceps en triceps worden hier gefilterd*/
+//    reset_timer.attach(resetlooper, 0.1); //
 
     goto directionchoice; // goes to first while(1) for the deciding the direction