Quadcopter working with accelerômeter and accelerometer, and bluetooth radio for communication

Dependencies:   mbed

Revision:
0:56b8c86181b1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Controllers/PID.h	Tue May 21 14:12:13 2013 +0000
@@ -0,0 +1,24 @@
+#ifndef PID_H
+#define PID_H
+
+class PID
+{
+    public:
+        PID(float kp, float ki, float kd, float dt);
+        
+        void setGains(float kp, float ki, float kd);
+        void reset();
+        float compute(float setPoint, float currentPoint);
+        
+        float getP();
+        float getI();
+        float getD();
+        
+    private:
+        float kp, ki, kd, _pid;
+        float dt;
+        float lastErro, lastSumErro;
+        float integral;
+};
+
+#endif