Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope MODSERIAL QEI biquadFilter mbed Servo
Diff: main.cpp
- Revision:
- 18:ea605c49afee
- Parent:
- 10:7339dca7d604
- Child:
- 19:e1e18746d98d
--- a/main.cpp Tue Oct 23 08:44:17 2018 +0000 +++ b/main.cpp Fri Oct 26 10:54:16 2018 +0000 @@ -55,9 +55,9 @@ void output_all() { motor1_pwm = fabs(u1); - motor1_dir = u1 > 0.5f; + motor1_dir = u1 > 0.0f; motor2_pwm = fabs(u2); - motor2_dir = u2 > 0.5f; + motor2_dir = u2 > 0.0f; static int output_counter = 0; output_counter++; if (output_counter == 100) {pc.printf("Something something... %f",u1); output_counter = 0;} //Print to screen at 10 Hz with MODSERIAL @@ -79,7 +79,7 @@ state_timer.start(); state_changed = false; } - u1 = 0.6f; //a low PWM value to move the motors slowly (0.0 to 0.45 don’t do much due to friction) + u1 = 0.55f; //a low PWM value to move the motors slowly (0.0 to 0.45 don’t do much due to friction) // fabs(motor1.velocity()) < 0.1f && if (state_timer.read() > 5.0f) { current_state = calib_emg; //the NEXT loop we will be in calib_emg state