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: Motor_with_encoder MODSERIAL mbed HIDScope
Revision 19:8746a2c663f8, committed 2017-11-01
- Comitter:
- MMartens
- Date:
- Wed Nov 01 15:39:46 2017 +0000
- Parent:
- 18:5c4e27db4d9e
- Commit message:
- pid control;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Nov 01 15:31:09 2017 +0000
+++ b/main.cpp Wed Nov 01 15:39:46 2017 +0000
@@ -80,7 +80,7 @@
//pc.printf("pos: %d, speed %f reference position = %.2f\r ",motor1.getPosition(), motor1.getSpeed(), setpoint);
//motorpid = PID(potvalue - position, M1_KP, M1_KI, M1_KD, M1_TS, m1_err_int, m1_prev_err, m1_f_v1, m1_f_v2, M1_F_A1, M1_F_A2, M1_F_B0, M1_F_B1, M1_F_B2);
-
+
error1 = setpoint - angle;
error2 = setpoint2 - angle2;