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 Robot_Software by
Diff: help_functions/PID_controller.h
- Revision:
- 1:ce487c9929dd
- Parent:
- 0:ef81b9f14f58
diff -r ef81b9f14f58 -r ce487c9929dd help_functions/PID_controller.h --- a/help_functions/PID_controller.h Fri Oct 19 07:50:39 2018 +0000 +++ b/help_functions/PID_controller.h Mon Oct 22 11:10:41 2018 +0000 @@ -1,8 +1,13 @@ #include "mbed.h" +double Kp = 7.5; +double Ki = 1.02; +double Kd = 10; +double samplingfreq = 1000; + double PID_controller(double error) { - Kp = potmeter2.read()*3; + //Kp = potmeter2.read()*3; double u_k = Kp * error;