yotaro morizumi
/
zoomy_customLibrary
my new gear...
Diff: pid.hpp
- Revision:
- 0:1456b6f84c75
diff -r 000000000000 -r 1456b6f84c75 pid.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pid.hpp Fri Feb 25 05:20:11 2022 +0000 @@ -0,0 +1,27 @@ +#ifndef PID_H +#define PID_H +#include"mbed.h" + +class Pid{ + public: + Pid(double get_Kp,double get_Ki,double get_Kd,int plumi); + double returnVal(double get_target,double input_val,double time); + void setGain(double get_Kp,double get_Ki,double get_Kd); + void setMax(double get_max,double get_min); + private: + double max_val; + double minimum_val; + double Kp; + double Ki; + double Kd; + double e_o; + double e_c; + double Operation_amount; + double target; + double Give_P; + double Give_I; + double Give_D; + double plusminus; +}; + +#endif \ No newline at end of file