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
Fork of testPID by
Diff: main.cpp
- Revision:
- 31:98a1155f5edb
- Parent:
- 30:ec66691d226d
- Child:
- 32:054900bfb0a5
--- a/main.cpp Tue Oct 20 13:13:25 2015 +0000 +++ b/main.cpp Tue Oct 20 13:16:40 2015 +0000 @@ -65,10 +65,10 @@ //PID variables double u1; double u2; //Output of PID controller (PWM value for motor 1 and 2) double m1_error=0; double m1_e_int=0; double m1_e_prev=0; //Error, integrated error, previous error -const double m1_kp=0.01; const double m1_ki=0.125; const double m1_kd=0.5; //Proportional, integral and derivative gains. +const double m1_kp=0.01; const double m1_ki=0.00125; const double m1_kd=0.5; //Proportional, integral and derivative gains. double m2_error=0; double m2_e_int=0; double m2_e_prev=0; //Error, integrated error, previous error -const double m2_kp=0.01; const double m2_ki=0.125; const double m2_kd=0.5; //Proportional, integral and derivative gains. +const double m2_kp=0.01; const double m2_ki=0.00125; const double m2_kd=0.5; //Proportional, integral and derivative gains. //lowpass filter 7 Hz - envelope
