State machine
Dependencies: mbed Adafruit_GFX BioroboticsMotorControl MODSERIAL BioroboticsEMGFilter
Diff: main.cpp
- Revision:
- 29:77fee8a01529
- Parent:
- 28:25917b26022c
- Child:
- 30:a45bbfa6bd22
diff -r 25917b26022c -r 77fee8a01529 main.cpp --- a/main.cpp Thu Nov 01 12:31:39 2018 +0000 +++ b/main.cpp Thu Nov 01 12:55:46 2018 +0000 @@ -343,9 +343,9 @@ main_motor.set_extra_reduction_ratio(-main_gear_ratio); sec_motor.set_extra_reduction_ratio(sec_gear_ratio); - // Set the maximum pwm fraction for both motors. - main_motor.set_max_pwm_fraction(0.5); - sec_motor.set_max_pwm_fraction(0.5); + // Set the maximum speed for both motors. + main_motor.set_max_speed(0.5); + sec_motor.set_max_speed(0.5); // Start the motor controller at the desired frequency. main_motor.start(pid_period);