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 3
3
* Reading analog input 0 to control analog PWM output 3
4
4
********************************************************/
5
5
6
- #include < PID_v1 .h>
6
+ #include < PID_v1_bc .h>
7
7
8
8
#define PIN_INPUT 0
9
9
#define PIN_OUTPUT 3
Original file line number Diff line number Diff line change 11
11
// Wokwi https://wokwi.com/projects/357374218559137793
12
12
// Wokwi https://wokwi.com/projects/356437164264235009
13
13
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
18
15
19
16
// Define Variables we'll be connecting to
20
17
double Setpoint, Input, Output;
@@ -124,9 +121,7 @@ void report(void)
124
121
Serial.print (" CV:" );
125
122
Serial.print (Output);
126
123
Serial.print (" Int:" );
127
- #if defined(USE_HACK)
128
124
Serial.print (myPID.outputSum );
129
- #endif
130
125
Serial.print (' ' );
131
126
Serial.println ();
132
127
}
@@ -153,9 +148,7 @@ void reportLCD(void)
153
148
lcd.print (" " );
154
149
lcd.setCursor (0 ,3 );
155
150
lcd.print (" Int:" );
156
- #if defined(USE_HACK)
157
151
lcd.print (myPID.outputSum ,4 );
158
- #endif
159
152
lcd.print (' ' );
160
153
lcd.println ();
161
154
}
You can’t perform that action at this time.
0 commit comments