![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
2nd draft
Dependencies: HIDScope MODSERIAL QEI biquadFilter mbed Servo
Fork of robot_mockup by
Diff: main.cpp
- Revision:
- 45:198654304238
- Parent:
- 44:145827f5b091
- Child:
- 46:c8c5c455dd51
--- a/main.cpp Fri Oct 23 10:12:47 2015 +0000 +++ b/main.cpp Fri Oct 23 10:18:29 2015 +0000 @@ -835,12 +835,15 @@ } for(int j = 0; j < window; j++){ // sum all values in the array - th1 += movavg1[j]; - th2 += movavg2[j]; - th3 += movavg3[j]; - th4 += movavg4[j]; + sum1 += movavg1[j]; + sum2 += movavg2[j]; + sum3 += movavg3[j]; + sum4 += movavg4[j]; } - th1 = th1/window; //divide sum by number of samples -> average + biceps_avg = sum1/window; //divide sum by number of samples -> average + triceps_avg = sum2/window; + flexor_avg = sum3/window; + extens_avg = sum4/window; */ //analyze emg (= velocity)