
Script to plot both a raw EMG signal and the filtered signal in HIDscope
Revision 4:d32946ab9c54, committed 2015-10-26
- Comitter:
- roosbulthuis
- Date:
- Mon Oct 26 16:10:02 2015 +0000
- Parent:
- 3:7cb317c00afb
- Child:
- 5:cf85007ce40a
- Commit message:
- Subtracted mean of input signal, rectifier works, but filters seem not to work
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Oct 26 15:49:35 2015 +0000 +++ b/main.cpp Mon Oct 26 16:10:02 2015 +0000 @@ -3,6 +3,7 @@ //included for fabs() function #include <math.h> #include "HIDScope.h" +#include <iostream> Ticker sample_timer; HIDScope scope(2); @@ -172,6 +173,7 @@ void sample() { input = analog_emg_left.read(); + input = input-0.45; //FIRST SUBTRACT MEAN THEN FILTER //input_right = analog_emg_right.read(); filter_signal = filter(input, v1, v2); //filter_right = filter(input_right, v1_right, v2_right);