
Script to plot both a raw EMG signal and the filtered signal in HIDscope
Revision 1:f32f8eac8af1, committed 2015-10-26
- Comitter:
- roosbulthuis
- Date:
- Mon Oct 26 14:45:46 2015 +0000
- Parent:
- 0:c85b764527f4
- Child:
- 2:1d29b91bc46a
- Commit message:
- Plotting raw signal in channel 0 Hidscope works; Plotting raw signal in channel 1 Hidscope doesn't work; Plotting filtered signal in channel 0 or 1 Hidscope doesn't 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 14:26:22 2015 +0000 +++ b/main.cpp Mon Oct 26 14:45:46 2015 +0000 @@ -24,7 +24,7 @@ double biquad(double u, double &v1, double &v2, const double a1, const double a2, const double b0, const double b1, const double b2) { - double v = u * a1*v1 * a2*v2; + double v = u - a1*v1 - a2*v2; double y = b0*v + b1*v1 + b2*v2; //values of v2 and v1 are updated, as they are passed by reference //they update globally @@ -140,8 +140,8 @@ filter_left = filter(input_left, v1_left, v2_left); filter_right = filter(input_right, v1_right, v2_right); - scope.set(0, input_left); - scope.set(1, test); + scope.set(1, input_left); + scope.set(0, filter_left); scope.send(); }