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:
- 16:8f175d2a472f
- Parent:
- 15:c1a8f28d6583
- Child:
- 17:cfe44346645c
diff -r c1a8f28d6583 -r 8f175d2a472f main.cpp --- a/main.cpp Fri Oct 09 09:00:16 2015 +0000 +++ b/main.cpp Fri Oct 09 09:57:09 2015 +0000 @@ -1,10 +1,11 @@ #include "mbed.h" #include "HIDScope.h" #include "Filterdesigns.h" +#inlcude "Kalibratie.h" //#include "MODSERIAL.h" //bugfix AnalogIn emg(A0); //Analog input van emg kabels -HIDScope scope(3); //3 scopes +HIDScope scope(2); //2 scopes Ticker EMGticker; //MODSERIAL pc(USBTX, USBRX); //bugfix @@ -13,17 +14,15 @@ double t = 1/ Fs; // voor EMGticker double y = 0; -double ymean = 0; void EMGfilter(){ //uitlezen emg signaal double u = emg.read(); - Filterdesigns(u,y, ymean); -// pc.printf("%f \n",u); //bugfix + Filterdesigns(u,y); +// pc.printf("%f \n",y); //bugfix // Plotten in HIDscope scope.set(0,u); //ongefilterde waarde naar scope 1 scope.set(1,y); //gefilterde waarde naar scope 2 - scope.set(2,ymean); // gefilterde en gemiddelde waarde naar scope 3 scope.send(); //stuur de waardes naar HIDscope }