4 directional EMG control of the XY table. Made during my bachelor end assignment.
Dependencies: C12832_lcd HIDScope mbed-dsp mbed
Revision 70:e84629c7dfed, committed 2015-06-19
- Comitter:
- jessekaiser
- Date:
- Fri Jun 19 11:39:12 2015 +0000
- Parent:
- 69:a1ba54587b35
- Child:
- 71:aee1289bc16a
- Commit message:
- Homing + Y-motor
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Jun 19 11:25:22 2015 +0000 +++ b/main.cpp Fri Jun 19 11:39:12 2015 +0000 @@ -181,7 +181,7 @@ } -/*void looper_motorx() +void looper_motorx() { emg_x = (filtered_pect - filtered_deltoid); @@ -213,13 +213,13 @@ Enablex = 0; } -}*/ +} int main() { // Attach the HIDScope::send method from the scope object to the timer at 500Hz. Hier wordt de sample freq aangegeven. // scopeTimer.attach_us(&scope, &HIDScope::send, 2e3); -/* + MS1 = 1; MS2 = 0; MS3 = 0; @@ -304,7 +304,7 @@ lcd.cls(); wait(1); Enablex = 0; - Enabley = 0;*/ + Enabley = 0; MS1 = 1; MS2 = 0; @@ -326,8 +326,8 @@ arm_biquad_cascade_df1_init_f32(&highnotch_deltoid, 2 , highnotch_const, highnotch_deltoid_states); emgtimer.attach(looper_emg, 0.01); - //Ticker looptimer1; - //looptimer1.attach(looper_motorx, 0.01); //X-Spindle motor, why this freq? + Ticker looptimer1; + looptimer1.attach(looper_motorx, 0.01); //X-Spindle motor, why this freq? Ticker looptimer2; looptimer2.attach(looper_motory, 0.01); //Y-Spindle motor