kakding
Dependencies: HIDScope biquadFilter mbed
Fork of biquad2 by
Revision 2:192bd1385db6, committed 2015-10-21
- Comitter:
- Paashaas
- Date:
- Wed Oct 21 13:35:04 2015 +0000
- Parent:
- 1:911daa1a9f4a
- Commit message:
- kakding
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 911daa1a9f4a -r 192bd1385db6 main.cpp --- a/main.cpp Tue Oct 20 13:45:43 2015 +0000 +++ b/main.cpp Wed Oct 21 13:35:04 2015 +0000 @@ -67,45 +67,45 @@ biquadFilter notch2_4( dennotch_2_2 , dennotch_2_3 , numnotch_2_1 , numnotch_2_2 , numnotch_2_3 ); // biquadFilter lowpass_4( denlow_2 , denlow_3 , numlow_1 , numlow_2 , numlow_3 ); // EMG envelope +double y5_1, y5_2, y5_3, y5_4; + void myController() { -double y1_1 = highpass.step (u1); +double y1_1 = highpass.step ( emg1.read() ); 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); + y5_1 = lowpass.step (y4_1); -double y1_2 = highpass_2.step (u2); +double y1_2 = highpass_2.step ( emg2.read() ); 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); + y5_2 = lowpass_2.step (y4_2); -double y1_3 = highpass_3.step (u3); +double y1_3 = highpass_3.step ( emg3.read() ); 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); + y5_3 = lowpass_3.step (y4_3); -double y1_4 = highpass_4.step (u4); +double y1_4 = highpass_4.step ( emg4.read() ); 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); + 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() { - sample_ticker.attach(&myController,0.002); - while (true){ - } + sample_ticker.attach(&myController,0.002); + while (true){} } \ No newline at end of file