Demo script of group 12 BIOROBOTICS
Dependencies: HIDScope MODSERIAL QEI biquadFilter mbed
Fork of another_try_from_scratch_on_emg by
Revision 56:a38412383477, committed 2016-11-03
- Comitter:
- FloorC
- Date:
- Thu Nov 03 16:41:10 2016 +0000
- Parent:
- 55:d742332ced11
- Commit message:
- DEMO_VERSION!
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 03 15:27:59 2016 +0000 +++ b/main.cpp Thu Nov 03 16:41:10 2016 +0000 @@ -310,20 +310,20 @@ while (true) { // neverending loop -counts_encoder1 = Encoder1.getPulses(); +/*counts_encoder1 = Encoder1.getPulses(); rev_counts_motor1=(float)counts_encoder1/(gearboxratio*rev_rond); -rev_counts_motor1_rad=rev_counts_motor1*6.28318530718; +rev_counts_motor1_rad=rev_counts_motor1*6.28318530718; */ -pc.printf("%f \r\n", d_ref); +pc.printf("%f %f \r \n", d_ref, rev_counts_motor1_rad); //pc.printf("%f ", rev_counts_motor1_rad); //pc.printf("%f",w_var); -pc.printf("%d\n",start_motor); +//pc.printf("%d\n",start_motor); - if (onoffsignal_biceps==-1) //left biceps contracted - { - if (switch_signal%2==0) //switch even - { + if (onoffsignal_biceps==-1){ //left biceps contracted + + if (switch_signal%2==0){ //switch even + speedmotor1=controlOutput; //richting_motor1 = ccw; //motor 1, left //pwm_motor1 = speedmotor1; //speed of motor 1 @@ -374,6 +374,8 @@ pwm_motor2=0; pwm_motor1=0; start_motor = true; + + } }//while true closed