4 directional EMG control of the XY table. Made during my bachelor end assignment.

Dependencies:   C12832_lcd HIDScope mbed-dsp mbed

Files at this revision

API Documentation at this revision

Comitter:
jessekaiser
Date:
Mon Jun 22 22:53:27 2015 +0000
Parent:
83:067e07db027c
Child:
85:a7493d3dd4ce
Commit message:
Programma gebruikt in rapport

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Jun 22 20:30:23 2015 +0000
+++ b/main.cpp	Mon Jun 22 22:53:27 2015 +0000
@@ -51,10 +51,10 @@
 DigitalOut MS3(p29);
 
 //EMG inputs
-AnalogIn emg1(p15); //EMG bordje bovenop, biceps
+AnalogIn emg1(p15); //biceps
 AnalogIn emg2(p16); //triceps
-AnalogIn emg3(p17);
-AnalogIn emg4(p18);
+AnalogIn emg3(p17); //pectoralis major
+AnalogIn emg4(p18); //deltoid
 
 //HIDScope scope(4);
 //Ticker   scopeTimer;
@@ -80,7 +80,8 @@
 arm_biquad_casd_df1_inst_f32 highnotch_pect;
 arm_biquad_casd_df1_inst_f32 highnotch_deltoid;
 //highpass filter settings: Fc = 20 Hz, Fs = 500 Hz, notch Fc = 50, Fs = 500 Hz
-float highnotch_const[] = {0.8370879899975344, -1.6741759799950688, 0.8370879899975344, 1.6474576182593796, -0.7008943417307579, 0.7063988100714527, -1.1429772843080923, 0.7063988100714527, 1.1429772843080923, -0.41279762014290533};
+float highnotch_const[] = {0.8370879899975344, -1.6741759799950688, 0.8370879899975344, 1.6474576182593796, -0.7008943417307579, 
+0.7063988100714527, -1.1429772843080923, 0.7063988100714527, 1.1429772843080923, -0.41279762014290533};
 
 //state values
 float lowpass_biceps_states[4];