   lcd.clear();
   lcd.setCursor(0, 0);
   lcd.print("Opening door");
-  Serial.println("Opening the door..");
+  DEBUGLN("Opening the door..");
   // send high to door open motor pin
   digitalWrite(PIN_DOOR_UP, HIGH);
 
   byte timeoutcount = 0;
 
   // loop until limit switch is hit (also add timeout)
-  Serial.print("Waiting for door to open");
+  DEBUGLN("Waiting for door to open");
   while(digitalRead(PIN_LIMSW_UP) == LOW){
     wdt_reset();
     delay(DELAY_MS);
     timeoutcount++;
     if(timeoutcount > TIMEOUT_MAX){
-      Serial.print("\nERROR! door not closing properly. Check limit switch.\n");
-      Serial.print("Pretending that it's closed for now..");
+      ERRLN("\nERROR! door not closing properly. Check limit switch.\n");
+      ERRLN("Pretending that it's closed for now..");
       couldnt_open_door = true;
       break;
     }
-    Serial.print(".");
+    DEBUG(".");
   }
   if(timeoutcount <= TIMEOUT_MAX){
     couldnt_open_door = false;
   }
   hit_top = true;
-  Serial.println();
+  DEBUGLN();
 
   // send low to door open motor pin
   digitalWrite(PIN_DOOR_UP, LOW);
 
-  Serial.println("Door opened!!");
+  DEBUGLN("Door opened!!");
   // set door is open bool to true
   door_open = true;
 


#define MENU_COUNT 2

volatile byte f_timer=0;

char menu_pos = 0;

#include "RTClib.h"
#include "encoder.h"

//#define DEBUG_EN
#ifdef DEBUG_EN
  #define DEBUG(c) Serial.print(c);
  #define DEBUGLN(c) Serial.println(c);
#else
  #define DEBUG(c) ;
  #define DEBUGLN(c) ;
#endif

#define ERR_EN
#ifdef ERR_EN
  #define ERR(c) Serial.print(c);
  #define ERRLN(c) Serial.println(c);
#else
  #define ERR(c) ;
  #define ERRLN(c) ;
#endif

#define LATITUDE -42.9166667
#define LONGITUDE 147.3333282

