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 biquadFilter mbed
Fork of emg_import by
Diff: main.cpp
- Revision:
- 3:79b95226a608
- Parent:
- 2:025d9065b25f
- Child:
- 4:7d9ca9c1dcce
diff -r 025d9065b25f -r 79b95226a608 main.cpp
--- a/main.cpp Fri Oct 21 12:41:47 2016 +0000
+++ b/main.cpp Fri Oct 21 12:49:15 2016 +0000
@@ -14,19 +14,19 @@
//define variables
double emg_0_value;
-biquadFilter filter(-1.1430, 0.4128, 0.6389, -1.2779, 0.6389); //initialize filter
+biquadFilter biqfilter(-1.1430, 0.4128, 0.6389, -1.2779, 0.6389); //initialize filter
void filter(){
emg_0_value=emg0.read(); //read the emg value from the elektrodes
led=!led;
- emg_filter=filter.step(emg_0_value)
+ double emg_filter=biqfilter.step(emg_0_value) ;
//send signals to scope
scope.set(0, emg_0_value ); //set emg signal to scope in channel 1
scope.set(1, emg_filter );
scope.send(); //send all the signals to the scope
- pc.printf("emg raw: %f, emg filter %f \r\n",emg_o_value,emg_filter);
+ pc.printf("emg raw: %f, emg filter %f \r\n",emg_0_value,emg_filter);
}
//program
