the lastest code by Castle. 27 Nov

Dependencies:   mpu9250_i2c biquadFilter PCA peakdetection Eigen

Revision:
5:c37def827168
Parent:
4:15d6c7123b09
Child:
6:7982fe5f1806
diff -r 15d6c7123b09 -r c37def827168 main.cpp
--- a/main.cpp	Mon Nov 25 23:38:03 2019 +0000
+++ b/main.cpp	Mon Nov 25 23:44:37 2019 +0000
@@ -32,7 +32,7 @@
 BiQuadChain bqc;
 
 
-#define SLEEP_TIME                  100 // (msec)
+#define SLEEP_TIME                  10 // (msec)
 
 
 // main() runs in its own thread in the OS
@@ -108,13 +108,13 @@
                 {
                     res_smooth = bqc.step(res(i));
                     res_list.push_back(res_smooth);
-                    printf("result after filter in for loop %d: %f\n\r",i,res_smooth);
+                    //printf("result after filter in for loop %d: %f\n\r",i,res_smooth);
                     //std::cout << "\t" << bqc.step(  ) << std::endl;
                 }
                 int len = res_list.size();
                 //printf("len of res:%d\n\r", len);
                 numpeak = peak.findPeaks(res_list,len,threshold);
-                printf("height in main: %f\n\r", threshold);
+                //printf("height in main: %f\n\r", threshold);
                 step = step + numpeak;
                 printf("num of step: %d\n\r", step);