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 Sep 30 15:49:23 2014 +0000
Parent:
21:daddd9c1aea8
Child:
23:8d9a623dd713
Commit message:
emgfloat.write(0); wanneer geen emg gemeten wordt, dan heeft emgfloat toch een waarde (niet zeker of dit noodzakelijk is, maar heb op dit moment emg problemen en wil script controleren)

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Sep 30 14:18:21 2014 +0000
+++ b/main.cpp	Tue Sep 30 15:49:23 2014 +0000
@@ -5,6 +5,7 @@
 //Define objects
 AnalogIn    emg0(PTB1); //Analog input
 PwmOut      emgfloat(PTD4);//Float voor EMG-waarde
+emgfloat.write(0);          // float is automatisch 0, dus als geen emg gemeten wordt, dan toch nog een waarde (niet zeker of dit noodzakelijk is)
 PwmOut      red(LED_RED); //PWM output
 PwmOut      green(LED_GREEN);
 PwmOut      blue(LED_BLUE);
@@ -59,7 +60,9 @@
     * Please mind that the parentheses after looper are omitted when using attach.
     */
     log_timer.attach(looper, 0.001);
+    goto directionchoice;
     while(1) { //Loop keuze DIRECTION
+        directionchoice:
         for(int i=1; i<4; i++) {
             if(i==1) {           //red
                 red=0;