       // time after sunrise - will be negative so below can say time after sunrise
       delta_mins = (sunrise[tl_hour] * 60 - now.hour() * 60) + sunrise[tl_minute] - now.minute();
     }
-
+#ifdef DEBUG_EN
     if(delta_mins < 0){
       Serial.print("Time after sunrise: ");
       Serial.print((int)-delta_mins / 60);
       Serial.print(":");
       Serial.println(-delta_mins % 60);
-    } else {
+    } else {     
       Serial.print("Time until sunrise: ");
       Serial.print(delta_mins / 60);
       Serial.print(":");
       Serial.println(delta_mins % 60);
     }
-  }
-  Serial.println();
+#endif
+  }
+  DEBUGLN();
 
 }
 


void updateDoor(){
  if(is_day_time && !door_open){
    Serial.print("It's daytime and we are now opening the door!");
    openDoor();
  } else if (!is_day_time && door_open){
    Serial.print("It's night time and we are now closing the door!");
    closeDoor();
  }
  door_retry_seconds_c += 4;

    lcd.print("EEPROM checksum");
    lcd.setCursor(0, 1);
    lcd.print("error :(");
    DEBUGLN("Writing default values for sunset delay.");
    EEPROM.write(SUNSET_DT_0_P, SUNSET_DT_0_V);
    EEPROM.write(SUNSET_DT_1_P, SUNSET_DT_1_V);
    EEPROM.write(SUNSET_DT_C_P, SUNSET_DT_C_V);
    DEBUGLN("Done.");
    delay_time_after_sunset = (SUNSET_DT_0_V << 4) + SUNSET_DT_1_V;
  } else {
    delay_time_after_sunset = (sunset_dt_v0 << 4) + sunset_dt_v1;
