Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope MODSERIAL QEI TextLCD mbed
Fork of TotalControlEmg2 by
Diff: main.cpp
- Revision:
- 20:11e1244ad2ad
- Parent:
- 19:6c0245063b96
- Child:
- 21:8fe8419de3e9
--- 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)