
EMG and motor script together, Not fully working yet,.
Dependencies: Encoder MODSERIAL QEI biquadFilter mbed
Fork of Code_MotorEMG by
Diff: main.cpp
- Revision:
- 15:46acc9b5decf
- Parent:
- 14:291f9a29bd74
- Child:
- 16:d75bf6d7d60e
--- a/main.cpp Wed Nov 01 12:14:13 2017 +0000 +++ b/main.cpp Wed Nov 01 12:20:14 2017 +0000 @@ -203,7 +203,6 @@ // Couting system for values of X int tellerX(){ if (Move_done == true) { - Input_done = false; t.reset(); led_G=1; led_B=1; @@ -368,7 +367,7 @@ motorValue1 = 0; } else { - motorValue1 = 0.001*P1(error_o, kpo); + motorValue1 = 0.01*P1(error_o, kpo); } if (motorValue1 >=0) motor1DirectionPin=0; @@ -564,6 +563,7 @@ hcountb=4200*((sqrt(pow((Pex-Pbx),2)+pow((Pey-Pby),2)))/omtrekklosje); hcountr=4200*((sqrt(pow((Pex-Prx),2)+pow((Pey-Pry),2)))/omtrekklosje); pc.printf("ik reset hcounts"); + Input_done=false; } }