PID

Fork of PID by LDSC_Robotics_TAs

Revision:
0:7f9b4ca968ae
Child:
1:4df4895863cd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PID.h	Thu Feb 18 04:25:52 2016 +0000
@@ -0,0 +1,44 @@
+#ifndef PID_H
+#define PID_H
+
+#include "mbed.h"
+
+class PID{
+    public:
+
+        PID(float setKp, float setKi, float setKd, float setSampletime);       
+        void SetOutputLimits(float setoutputLimits_H, float setoutputLimits_L);
+        void SetInputLimits(float setinputLimits_H, float setinputLimits_L);
+        void Compute(float setreference, float setfeedbackvalue);  
+        
+        float Kp;
+        float Ki;
+        float Kd;
+ 
+        float error[3];
+        float output;
+        float reference;
+
+        
+
+        
+        float sampletime;
+        
+        
+
+    private:
+    
+        bool Outputlimit_bool;
+        bool Inputlimit_bool;
+        
+        float outputLimits_H;
+        float outputLimits_L;
+        float inputLimits_H;
+        float inputLimits_L;
+        
+        float feedbackvalue;
+ //       Ticker PID_timer;
+
+};
+
+#endif /* PID_H*/
\ No newline at end of file