File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed
PID_Basic_Backcalculation
PID_simulated_heater_disp Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change 33 * Reading analog input 0 to control analog PWM output 3
44 ********************************************************/
55
6- #include < PID_v1 .h>
6+ #include < PID_v1_bc .h>
77
88#define PIN_INPUT 0
99#define PIN_OUTPUT 3
Original file line number Diff line number Diff line change 1111// Wokwi https://wokwi.com/projects/357374218559137793
1212// Wokwi https://wokwi.com/projects/356437164264235009
1313
14- #include " PID_v1.h" // https://github.com/br3ttb/Arduino-PID-Library
15- // local copy of .h and .cpp are tweaked to expose the integral per
16- // https://github.com/br3ttb/Arduino-PID-Library/pull/133
17- #define USE_HACK // access the PID.outputSum variable
14+ #include " PID_v1_bc.h" // https://github.com/drf5n/Arduino-PID-Library
1815
1916// Define Variables we'll be connecting to
2017double Setpoint, Input, Output;
@@ -124,9 +121,7 @@ void report(void)
124121 Serial.print (" CV:" );
125122 Serial.print (Output);
126123 Serial.print (" Int:" );
127- #if defined(USE_HACK)
128124 Serial.print (myPID.outputSum );
129- #endif
130125 Serial.print (' ' );
131126 Serial.println ();
132127 }
@@ -153,9 +148,7 @@ void reportLCD(void)
153148 lcd.print (" " );
154149 lcd.setCursor (0 ,3 );
155150 lcd.print (" Int:" );
156- #if defined(USE_HACK)
157151 lcd.print (myPID.outputSum ,4 );
158- #endif
159152 lcd.print (' ' );
160153 lcd.println ();
161154 }
You can’t perform that action at this time.
0 commit comments