Decoupled position and current control working.
Diff: PID.h
- Revision:
- 2:89bb6272869b
- Child:
- 3:cae0b305d54c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PID.h Fri Jun 28 19:03:06 2013 +0000 @@ -0,0 +1,34 @@ +//Ben Katz, 2013 +//PID Controller class + +#include "mbed.h" +#ifndef PID_H +#define PID_H + +class PIDController{ +public: + +PIDController(float desired_position, float p_gain, float d_gain, float i_gain); +~PIDController(); + +float goal_position; + +float kp; +float kd; +float ki; + +float error; +float old_error; +float integral_error; + +float Update(void); + +private: + + + + + + +}; +#endif