Nikita Klimchuk
/
PID_new_temp
pid working code for Anssi's lab
Revision 4:4a3c3188e992, committed 2021-01-02
- Comitter:
- nikitakl
- Date:
- Sat Jan 02 17:10:29 2021 +0000
- Parent:
- 3:70e0372dbf2e
- Commit message:
- newwest
Changed in this revision
PID.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/PID.cpp Sat Jan 02 17:02:24 2021 +0000 +++ b/PID.cpp Sat Jan 02 17:10:29 2021 +0000 @@ -65,8 +65,8 @@ } int main() { - fanControl.period(0.00004f); //PWM frequency should be 25khz, which is achieved by setting its period to 0.00004 - SetTunings(4, 10, 2); // Values 4, 10 and 2 were proven to be the optimal P, I, D tunings + fanControl.period(0.00004f);//PWM frequency is set to 25khz by setting its period to 0.00004 + SetTunings(4, 10, 2); // Values 4, 10 and 2 were proven to be the optimal P, I, D tunings float oldTemperature = temperature.read(); float newTemperature= oldTemperature;