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: biquadFilter FastPWM MODSERIAL QEI mbed
Diff: main.cpp
- Revision:
- 43:d332aa9f49e0
- Parent:
- 42:bb43f1b67787
- Child:
- 44:ca74d11a2dac
--- a/main.cpp Thu Nov 01 14:58:02 2018 +0000 +++ b/main.cpp Thu Nov 01 15:02:32 2018 +0000 @@ -871,15 +871,21 @@ //If the emergency button is pressed, stop program via failing state buttonEmergency.rise(stopProgram); // Automatische triggers voor failure mode? -> ook error message in andere functies plaatsen! -// ============================= PC-COMMUNICATION ============================= +// ============================= PC-COMMUNICATION ============================ pc.baud(115200); // communication with terminal pc.printf("\n\n[START] starting O.D.I.N\r\n"); -// ============================= PIN DEFINE PERIOD ============================ +// ============================= PIN DEFINE PERIOD =========================== // If you give a period on one pin, c++ gives all pins this period pin3.period_us(15); -// ==================================== LOOP =================================== +// ==================================== LOOP ================================== // run state machine at 500 Hz stateTimer.attach(&stateMachine,dt); + +// =============================== ADD FILTERS =============================== + //Make filter chain for the first EMG + filter0.add(&Notch50_0).add(&Notch100_0).add(&Notch150_0).add(&Notch200_0).add(&Low_0).add(&High_0); + //Make filter chain for the second EMG + filter1.add(&Notch50_1).add(&Notch100_1).add(&Notch150_1).add(&Notch200_1).add(&Low_1).add(&High_1); }