EMG signals all around zero, not showing differences anymore in hidscope
Dependencies: HIDScope MODSERIAL biquadFilter mbed
Fork of a_check_emg_filtered_without_cal by
Revision 20:a0495210915b, committed 2016-10-24
- Comitter:
- daniQQue
- Date:
- Mon Oct 24 14:20:51 2016 +0000
- Parent:
- 19:fb98ff1d06ed
- Commit message:
- also error in hidscope, emg around zero...
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r fb98ff1d06ed -r a0495210915b main.cpp --- a/main.cpp Mon Oct 24 12:52:46 2016 +0000 +++ b/main.cpp Mon Oct 24 14:20:51 2016 +0000 @@ -14,8 +14,6 @@ DigitalOut led(LED_GREEN); //include led DigitalIn button (D9); //button -//define constant -const int freq=1000; //chosen sample frequency //define variables double emg_biceps_right; @@ -75,8 +73,8 @@ { pc.baud(115200); //start pc connection baudrate 115200 -sample_timer.attach (&filter, 1/freq); //continously execute the EMG reader and filter, it ensures that filter and sampling is executed every 1/frequency seconds -sample_timer.attach (&calibration,1/freq); //continously execute callibration, only affects it when button is pressed for a while. +sample_timer.attach (&filter, 0.001) //continously execute the EMG reader and filter, it ensures that filter and sampling is executed every 1/frequency seconds +sample_timer.attach (&calibration,0.001); //continously execute callibration, only affects it when button is pressed for a while. //endless loop while(1) {