 // only for plotting:
 char oven_is_on = 0;
 
-//Specify PID pointers and initial tuning parameters
-PID control_PID(&PID_in, &PID_out, &PID_setpoint,2,5,1, DIRECT);
+#define PID_Kp 2
+#define PID_Ki 5
+#define PID_Kd 1
+
+//Specify PID pointers and tuning parameters
+PID control_PID(&PID_in, &PID_out, &PID_setpoint, PID_Kp, PID_Ki, PID_Kd, DIRECT);
 
 // Digital outputs
 //     relay -> fan

 * timestamps, the temperature is interpolated linearly.
 */
const unsigned int tprofile_n = 5;
const unsigned long tprofile_times[] = {10000, 20000, 30000, 50000, 60000};
const float tprofile_temps[] =         {80, 200, 235, 235,   0};
reflow_profile tprofile(tprofile_n, tprofile_times, tprofile_temps);

void plot_callback(void) {
  // plotting thread
  plotter.Plot();
}

void control_callback(void) {


  // Set up serial plotter
  plotter.Begin(); // start plotter
  String headline = "Reflow oven (PID constants: P=";
  headline += String(PID_Kp);
  headline += " I=";
  headline += String(PID_Ki);
  headline += " D=";
  headline += String(PID_Kd);
  headline += ")";
  plotter.AddTimeGraph(headline,
                          18000, // about 3 minutes
                          "PID Setpoint (°C)", PID_setpoint,
                          "PID Input (°C)", PID_in,
                          "PID Output (%)", PID_out_percent,
                          "Oven state (on/off)", oven_is_on);

 // Serial.begin(115200);

  // Configure PID controller
  control_PID.SetOutputLimits(0, pwm_window);
