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:
Mon Oct 06 11:42:41 2014 +0000
Parent:
27:54167d54b0c5
Commit message:
correcte poorten toegevoegd voor bi en triceps

Changed in this revision

Project_main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Project_main.cpp	Fri Oct 03 13:05:50 2014 +0000
+++ b/Project_main.cpp	Mon Oct 06 11:42:41 2014 +0000
@@ -6,7 +6,7 @@
 
 //Define objects
 AnalogIn    emg0(PTB1);         //Analog input biceps
-AnalogIn    emg1(PTB2);         //Analog input triceps                          NO IDEA WELKE PTB 
+AnalogIn    emg1(PTB2);         //Analog input triceps                         
 
 PwmOut      emg_bifloat(PTD4);   //Float voor EMG-waarde biceps
 PwmOut      emg_trifloat(PTA4);  //Float voor EMG-waarde triceps
@@ -79,7 +79,7 @@
                 green=1;
                 blue=1;
                 for (int lag=0; lag<TIMEBETWEENBLINK; lag++) {
-                    if(emgfloat.read()>0.8) {                   // 0.8 klopt niet als grenswaarde. #nofilter
+                    if(emg_bifloat.read()>0.8) {                   // 0.8 klopt niet als grenswaarde. #nofilter
                         direction = 1;
                         blue = 0;
                         green = 0;
@@ -97,7 +97,7 @@
                 green=0;
                 blue=1;
                 for (int lag=0; lag<TIMEBETWEENBLINK; lag++) {
-                    if(emgfloat.read()>0.8) {                    //0.8 klopt niet als grenswaarde. #nofilter
+                    if(emg_bifloat.read()>0.8) {                    //0.8 klopt niet als grenswaarde. #nofilter
                         direction = 2;
                         blue = 0;
                         green = 1;
@@ -115,7 +115,7 @@
                 green=1;
                 blue=0;
                 for (int lag=0; lag<TIMEBETWEENBLINK; lag++) {
-                    if(emgfloat.read()>0.8) {                    //0.8 klopt niet als grenswaarde. #nofilter
+                    if(emg_bifloat.read()>0.8) {                    //0.8 klopt niet als grenswaarde. #nofilter
                         direction = 3;
                         blue = 1;
                         green = 0;
@@ -138,7 +138,7 @@
                 green=1;
                 blue=1;
                 for (int lag=0; lag<TIMEBETWEENBLINK; lag++) {
-                    if(emgfloat.read()>0.8) {                    // 0.8 klopt niet als grenswaarde. #nofilter
+                    if(emg_bifloat.read()>0.8) {                    // 0.8 klopt niet als grenswaarde. #nofilter
                         force = 1;
                         blue = 0;
                         green = 0;
@@ -156,7 +156,7 @@
                 green=0;
                 blue=1;
                 for (int lag=0; lag<TIMEBETWEENBLINK; lag++) {
-                    if(emgfloat.read()>0.8) {                    //0.8 klopt niet als grenswaarde. #nofilter
+                    if(emg_bifloat.read()>0.8) {                    //0.8 klopt niet als grenswaarde. #nofilter
                         force = 2;
                         blue = 0;
                         green = 1;
@@ -174,7 +174,7 @@
                 green=1;
                 blue=0;
                 for (int lag=0; lag<TIMEBETWEENBLINK; lag++) {
-                    if(emgfloat.read()>0.8) {                    //0.8 klopt niet als grenswaarde. #nofilter
+                    if(emg_bifloat.read()>0.8) {                    //0.8 klopt niet als grenswaarde. #nofilter
                         force = 3;
                         blue = 1;
                         green = 0;