Motor calibration
Dependencies: BioroboticsMotorControl mbed BioroboticsEMGFilter MODSERIAL
Diff: main.cpp
- Revision:
- 3:5b8a12611a1e
- Parent:
- 2:9d23d93d097f
- Child:
- 4:64d4fdf5437c
diff -r 9d23d93d097f -r 5b8a12611a1e main.cpp --- a/main.cpp Wed Oct 31 10:16:56 2018 +0000 +++ b/main.cpp Wed Oct 31 10:38:04 2018 +0000 @@ -35,7 +35,7 @@ if (time_passed_in_this_state1 >= 10) // After 5 seconds have passed (10 times Ticker motor_calib) { - motor1.set_current_angle_as_zero(); + motor1.define_current_angle_as_x_radians(0.785398); // Defines beginstate motor 2 as -42 degrees calibLED1 = 0; // LED becomes blue (purple if both motors are calibrated) } } @@ -56,7 +56,7 @@ if (time_passed_in_this_state2 >= 10) // After 5 seconds have passed (10 times Ticker motor_calib) { - motor2.set_current_angle_as_zero(); + motor2.define_current_angle_as_x_radians(-0.733038); // Defines beginstate motor 2 as -42 degrees calibLED2 = 0; // LED becomes red (purple if both motors are calibrated) } }