Remco Dasselaar / Mbed 2 deprecated TotalControlEmg2

Dependencies:   HIDScope MODSERIAL QEI TextLCD mbed

Fork of TotalControlEmg2 by Remco Dasselaar

Revision:
20:11e1244ad2ad
Parent:
19:6c0245063b96
Child:
21:8fe8419de3e9
diff -r 6c0245063b96 -r 11e1244ad2ad main.cpp
--- a/main.cpp	Tue Oct 13 12:28:32 2015 +0000
+++ b/main.cpp	Wed Oct 14 12:36:42 2015 +0000
@@ -28,21 +28,21 @@
 {
     LedBlue = 1;
     Init();
-    ymax = KalibratieMax(readymax);
+    ymin = KalibratieMin(readymin);
     wait(1);
-    ymin = KalibratieMin(readymin);
+    ymax = KalibratieMax(readymax);
 
     // bepalen van thresholds voor aan/uit
-    thresholdlow = 0.08; // standaardwaarde
-    thresholdmid = 0.3 * ymax; // afhankelijk van max output gebruiker
-    thresholdhigh = 0.4 * ymax;
+    thresholdlow = 0.2; // standaardwaarde
+    thresholdmid = 0.5 * ymax; // afhankelijk van max output gebruiker
+    thresholdhigh = 0.9 * ymax;
 }
 
 void EMGfilter()
 {
     //uitlezen emg signaal
     double u = emg.read();
-    double y = Filterdesigns(u, ymin);
+    double y = Filterdesigns(u);
     //pc.printf("%f \n",y); //bugfix
     // Plotten in HIDscope
     int mode = Mode(y, ymax, thresholdlow, thresholdmid, thresholdhigh); //bepaald welk signaal de motor krijgt (aan, uit, middel)