Basic but robust PID library

Dependents:   ESP8266_pid_mtrPos_webserver_SDcard_v2 ESP8266_pid_mtrSpeed_Webserver_SDcard ESP8266_pid_spd_and_pos_webserver_SDcard ESP8266_pid_redbot_webserver ... more

Files at this revision

API Documentation at this revision

Comitter:
electromotivated
Date:
Tue Dec 29 02:31:32 2015 +0000
Parent:
4:4ed1f5bccac8
Commit message:
Added Comments

Changed in this revision

PID.h Show annotated file Show diff for this revision Revisions of this file
diff -r 4ed1f5bccac8 -r 0cf2f6d13c71 PID.h
--- a/PID.h	Tue Nov 24 22:52:45 2015 +0000
+++ b/PID.h	Tue Dec 29 02:31:32 2015 +0000
@@ -34,6 +34,17 @@
             conflicts if the interrupt fires. Either ensure reads/writes
             are atomic operations, or call the stop() method perform the 
             read/write and then call the start() method.
+            
+            @param setpoint   The setpoint
+            @param feedback   Pointer to feedback/sensor data var  
+            @param output     Pointer to the output var
+            @param output_lower    The lower bound of the output value
+            @param output_upper    The upper bount of the output value
+            @param kp   The Proportional Gain value
+            @param ki   The Integral Gain value
+            @param kd   The Derivative Gain value 
+            @param Ts   The sample period at which the PID algorithm will
+                        generate an interrupt and run. 
         */
         PID(float* setpoint, float* feedback, float* output,
             float output_lower, float output_upper,
@@ -45,7 +56,9 @@
         void start();
         /*
             Stops PID Contoller; detaches callback from Ticker sample_timer.
-            Allows manual setting of output. 
+            Allows manual setting of output and read/write of shared vars, 
+            DON'T FORGET TO CALL stop() before read/write of shared vars!
+            Then after call start()!!!
         */
         void stop();
         /*