taiyou komazawa
/
Nucleo_fliping_arm
2018 HongoMechaTech A
lib/PID_Control.h
- Committer:
- Komazawa_sun
- Date:
- 2018-09-18
- Revision:
- 0:e83b840a5f86
File content as of revision 0:e83b840a5f86:
#ifndef PID_CONTROL_H_ #define PID_CONTROL_H_ #include <mbed.h> class PID_Control { public: PID_Control(double kp = 0, double ki = 0, double kd = 0); double PID(double present, double target, double interval); void reset(); void set_PID(double kp, double ki, double kd); private: double diff[2]; double integral; double p, i, d; double kp, ki, kd; double control; }; #endif