Alle drie de signalen gefilterd en binair gemaakt

Dependencies:   mbed HIDScope biquadFilter

Files at this revision

API Documentation at this revision

Comitter:
Feike
Date:
Fri Nov 01 08:26:26 2019 +0000
Parent:
25:cfd422c3cf4d
Commit message:
af

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r cfd422c3cf4d -r 1eb3c3b04b80 main.cpp
--- a/main.cpp	Thu Oct 31 18:25:53 2019 +0000
+++ b/main.cpp	Fri Nov 01 08:26:26 2019 +0000
@@ -21,11 +21,9 @@
 const int box_length = 50;
 const int box_lengthC = 150;
 const int box_checkC = 50;
-const float grenswaardeA0 = 0.025;
-const float grenswaardeB0 = 0.015;
-//const float grenswaardeA1 = 0.022;
-//const float grenswaardeB1 = 0.018;
-const float grenswaardeC = 0.015;
+const float grenswaardeA0 = 0.015;
+const float grenswaardeB0 = 0.014;
+const float grenswaardeC = 0.016;
 float Ay1;
 float Ay2;
 float A_array[leng_filt] = {0};
@@ -106,10 +104,6 @@
     {   if(A_ar3[j] == 1)
             { boxcheckA = 1;}           }
 
-    //for (int j=0; j<=box_length-1; j++)
-    //    {   if(A_ar3[j] == 0.5)
-    //        { boxcheckA = 0.5;}           }
-
     // Signaal 2 (B)    
     BiQuad lowpassB(b0,b1, b2, a0, a1, a2);
     float B = emg2.read();
@@ -140,10 +134,6 @@
     if(By2>grenswaardeB0)
     {   By3 = 1; }
     
-    //if(By2<=grenswaardeB0)
-    //{   if(By2>grenswaardeB1)
-    //    {   By3 = 0.5; }   }
-    
     if(By2<=grenswaardeB0)
     {   By3 = 0; }
     
@@ -155,12 +145,7 @@
     
     for (int j=0; j<=box_length-1; j++)
     {   if(B_ar3[j] == 1)
-            { boxcheckB = 1;}           }
-    
-    //for (int j=0; j<=box_length-1; j++)
-    //{   if(B_ar3[j] == 0.5)
-    //        { boxcheckB = 0.5;}           }
-    
+            { boxcheckB = 1;}           }  
     
     // Signaal 3 (C)
     BiQuad lowpassC(b0,b1, b2, a0, a1, a2);