nog een mooie biquad geniet ervan
Dependencies: HIDScope biquadFilter mbed
Fork of biquad2 by
Revision 1:911daa1a9f4a, committed 2015-10-20
- Comitter:
- Paashaas
- Date:
- Tue Oct 20 13:45:43 2015 +0000
- Parent:
- 0:f9aed4422fcb
- Commit message:
- hij is nog mooier geworden maar hij doet het nog niet helemaal
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f9aed4422fcb -r 911daa1a9f4a main.cpp --- a/main.cpp Fri Oct 16 09:39:22 2015 +0000 +++ b/main.cpp Tue Oct 20 13:45:43 2015 +0000 @@ -9,7 +9,7 @@ Ticker sample_ticker; // naam van de emg-ticker -HIDScope scope(2); // aantal kanalen voor je HIDScope +HIDScope scope(3); // aantal kanalen voor je HIDScope //highpass filter 20 Hz const double numhigh_1 = 0.956543225556877; @@ -70,26 +70,37 @@ void myController() { - highpass.step (u1); - notch1.step (u1); - notch2.step (u1); - lowpass.step (u1); +double y1_1 = highpass.step (u1); +double y2_1 = notch1.step (y1_1); +double y3_1 = notch2.step (y2_1); +double y4_1 = abs(y3_1); +double y5_1 = lowpass.step (y4_1); - highpass_2.step (u2); - notch1_2.step (u2); - notch2_2.step (u2); - lowpass_2.step (u2); +double y1_2 = highpass_2.step (u2); +double y2_2 = notch1_2.step (y1_2); +double y3_2 = notch2_2.step (y2_2); +double y4_2 = abs(y3_2); +double y5_2 = lowpass_2.step (y4_2); - highpass_3.step (u3); - notch1_3.step (u3); - notch2_3.step (u3); - lowpass_3.step (u3); +double y1_3 = highpass_3.step (u3); +double y2_3 = notch1_3.step (y1_3); +double y3_3 = notch2_3.step (y2_3); +double y4_3 = abs(y3_3); +double y5_3 = lowpass_3.step (y4_3); + - highpass_4.step (u4); - notch1_4.step (u4); - notch2_4.step (u4); - lowpass_4.step (u4); +double y1_4 = highpass_4.step (u4); +double y2_4 = notch1_4.step (y1_4); +double y3_4 = notch2_4.step (y2_4); +double y4_4 = abs(y3_4); +double y5_4 = lowpass_4.step (y4_4); + +scope.set(0,y5_1); +scope.set(1,y5_2); +scope.set(2,y5_3); +//scope.set(3,y5_4); +scope.send(); } int main()