2nd draft
Dependencies: HIDScope MODSERIAL QEI biquadFilter mbed Servo
Fork of robot_mockup by
Diff: main.cpp
- Revision:
- 63:08357f5c497b
- Parent:
- 62:e400138d625e
- Child:
- 64:21fbff25d80b
--- a/main.cpp Thu Oct 29 22:35:13 2015 +0000 +++ b/main.cpp Fri Oct 30 08:00:09 2015 +0000 @@ -638,12 +638,12 @@ void calibrate(void){ if(done1==false){ //if motor 1 limit has not been hit yet pwm_motor1=0.1; //move upper arm slowly cw - pc.printf("Motor 1 running %f \r\n"); + // pc.printf("Motor 1 running %f \r\n"); } if(done1==true && done2==false){ //if limit motor 1 has been hit pwm_motor1=0; //stop motor1 pwm_motor2=0.1; //start moving forearm slowly cw - pc.printf("Motor 2 running %f \r\n"); + // pc.printf("Motor 2 running %f \r\n"); } } @@ -652,7 +652,6 @@ { Ticker timer; - pc.printf("Starting sampling, to allow EMG to normalize\r\n"); start_sampling(); wait(0.5); @@ -665,6 +664,7 @@ pc.printf(" \r\n Starting in 3... \r\n"); wait(1); pc.printf(" \r\n Starting in 2... \r\n"); wait(1); pc.printf(" \r\n Starting in 1... \r\n"); wait(1); + pc.printf(" \r\n Measuring... \r\n"); timer.attach(&emg_min,SAMPLE_RATE); wait(3); @@ -810,7 +810,7 @@ pc.printf("%s+ %s",GREEN_,_GREEN); flexorMVC=flexor_power; } - //else + else pc.printf("- "); } @@ -820,7 +820,7 @@ pc.printf("%s+ %s",GREEN_,_GREEN); extensMVC=extens_power; } - //else + else pc.printf("- "); } @@ -1282,11 +1282,11 @@ void emgInstructions(){ pc.printf("\r\nPrepare the skin before applying electrodes: \n\r"); pc.printf("-> Shave electrode locations if needed and clean with alcohol \n\r"); wait(1); - pc.printf(" Check whether EMG signal looks normal. \n\r "); wait(1); + //pc.printf(" Check whether EMG signal looks normal. \n\r "); wait(1); pc.printf("\r\n To calibrate the EMG signals we will measure: \n\r "); pc.printf("- Minimum amplitude, while relaxing all muscles. \n\r "); pc.printf("- Maximum Voluntary Contraction of each muscle. \n\r"); wait(1); - pc.printf("\r\nFor the MVC you need to flex the mentioned muscle as much as possible for 3 seconds \n\r"); wait(0.5); + pc.printf("\r\nFor the MVC you need to flex the mentioned muscle for 3 seconds \n\r"); wait(0.5); pc.printf("The measurements will begin once you confirm you're ready [Hit any key] \n\r \n\r"); wait(0.5); }