 
 float tank_max_temp = 140;      // Deg. F; above this, pump is off
 float collector_min_temp = 40;  // Deg. F; below this, pump is off
-float on_threshold = 10;        // Deg. F differential before pump turns on
-float off_threshold = 10;       // Deg. F differential before pump turns off
+float on_threshold = 15;        // Deg. F differential before pump turns on
+float off_threshold = 0;        // Deg. F differential before pump turns off
 int interval = 60000;           // Delay in ms between readings
 
 /*


  // Assume that very negative readings are errors
  if (tank_temp < -50 || collector_temp < -50) {
    Serial.println("Screwy reading, ignoring");
  }

  // If tank is hot enough, pump is off
  else if (tank_temp >= tank_max_temp) {
    Serial.println("Tank is over max temp, pump off");
    no_pump();
  }

  // If collector is cold, pump is off
  else if (collector_temp <= collector_min_temp) {
    Serial.println("Collector is under min temp, pump off");
    no_pump();
  }

  // If collector is significantly hotter thank tank, pump is on
  else if (collector_temp > tank_temp + on_threshold) {
    Serial.println("Collector is hotter than tank, pump on");
    pump();
  }

  // If collector is significantly colder than tank, pump is off
  else if (tank_temp > collector_temp + off_threshold) {
    Serial.println("Collector is colder than tank, pump off");
    no_pump();
  }


}

void print_temps(float tank_temp, float collector_temp) {
  time_t t = now();
  Serial.print(year(t));
  Serial.print("-");
  Serial.print(month(t));
  Serial.print("-");
  Serial.print(day(t));
  Serial.print(", ");

  Serial.print(hour(t));
  Serial.print(":");
  Serial.print(minute(t));
  Serial.print(":");
  Serial.print(second(t));
  Serial.print(", ");
  
  Serial.print(tank_temp);
  Serial.print(", ");

  Serial.println(collector_temp);
}

// Main
