   Serial.println("Door opened!!");
   // set door is open bool to true
   doorOpen = true;
-
-  wdt_enable(WDTO_4S);
 
 }
 

  Serial.print(now.second(), DEC);
  Serial.print("\n");
  
  // testing..
  checkTime();
  //openDoor();
  //closeDoor();
  wdt_enable(WDTO_4S);
}



void enterSleep() {
  set_sleep_mode(SLEEP_MODE_IDLE);


    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;
    eepromSuccess += 0x10;
  }

  if(eepromSuccess == 0x11){
    Serial.println("EEPROM read successfully.");
  }
}

// Interrupt routine tat resets the sleep flag
ISR(TIMER1_OVF_vect)
{
  /* set the flag. */
