    * turn the output pin on/off based on pid output
    ************************************************/
   unsigned long now = millis();
+
+  if(now - previousMillis > serialPrintTime) {
+    previousMillis = now;
+    currentTime = currentTime + serialPrintTime / 1000;
+    Serial.print(currentTime);
+    Serial.print(",");
+    Serial.print(input);    
+    Serial.print("\n");
+  }
+
   if (now - windowStartTime > windowSize){
     //time to shift the Relay Window
-    windowStartTime += windowSize;
+    windowStartTime += windowSize;                   
   }
   oldRelayStatus = relayStatus;
   if (input == 0.00){


// Setup PID
#define RelayPin 11
PID myPID(&input, &output, &setpoint,1600,8,0, DIRECT);


//--> Arduino Setup <--

// Timing
long previousMillis = 0;
long tempInterval = 1000;
long serialPrintTime = 5000;
long currentTime = 0;

// PID
double setpoint = 93;
double input = 0;
double oldInput = 0;
double output;
