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: HIDScope QEI biquadFilter mbed
Fork of EMG_Controllertest_servo by
Diff: emg.h
- Revision:
- 3:1d43dd4f37eb
- Parent:
- 2:57523bb4e9c6
- Child:
- 6:6cb7c0247560
--- a/emg.h Mon Oct 24 11:31:09 2016 +0000 +++ b/emg.h Mon Oct 24 11:43:45 2016 +0000 @@ -8,7 +8,7 @@ states state = STATE_DEFAULT; //Creating two scope channels -HIDScope scope(2); +//HIDScope scope(2); //Notch filter BiQuadChain notch_50; @@ -56,9 +56,9 @@ double SumRMS1; double SumRMS2; -double input_force0; -double input_force1; -double input_force2; +double Norm_EMG_0; +double Norm_EMG_1; +double Norm_EMG_2; //count for emg min max int start_calibration = 0; @@ -170,16 +170,16 @@ } //calculating input_forces for controller - input_force0 = (RMS0 - min_emg[0])/(max_emg[0]-min_emg[0]); - input_force1 = (RMS1 - min_emg[1])/(max_emg[1]-min_emg[1]); - input_force2 = (RMS2 - min_emg[2])/(max_emg[2]-min_emg[2]); + Norm_EMG_0 = (RMS0 - min_emg[0])/(max_emg[0]-min_emg[0]); + Norm_EMG_1 = (RMS1 - min_emg[1])/(max_emg[1]-min_emg[1]); + Norm_EMG_2 = (RMS2 - min_emg[2])/(max_emg[2]-min_emg[2]); //Send scope data - scope.set(0,emg_sample[0]); - scope.set(1,input_force0); + // scope.set(0,emg_sample[0]); + //scope.set(1,Norm_EMG_0); //scope.set(2,input_force1); //scope.set(3,input_force2); - scope.send(); + //scope.send(); go_emgSample = false; }