PID

Dependents:   balance_all

Revision:
0:3d03a93d9671
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PID.h	Wed May 16 10:27:33 2018 +0000
@@ -0,0 +1,20 @@
+#ifndef PID_H
+#define PID_H
+
+#include "mbed.h"
+
+extern Serial pc;
+
+class PID
+{
+    protected:
+    public: 
+    /*x = error
+    output = PID output
+    time = time since last pid is run
+    //integral = sum of all previous error
+    */
+   void control(float x, float *output, float time, float integral);
+};
+
+#endif
\ No newline at end of file