   pinMode(MODE_SWITCH_PIN,INPUT_PULLUP);
 
   EEPROM.get(MODE_INDEX,mode);
-
   Serial.print(F("Got mode from eeprom ") );
   Serial.println(mode);
-   
+  if ( mode < 0 )
+    mode = 0;
+
+  int32_t wakeUnixTime;
+  EEPROM.get(WAKE_INDEX,wakeUnixTime);
+  Serial.print(F("Got wakeTime from eeprom ") );
+  Serial.println(wakeUnixTime);
+  if ( wakeUnixTime >= 0 )
+    wakeTime = DateTime(wakeUnixTime);
+  
   rtcSetup();
   neoPixelSetup();
   
 }
-
+bool rtcRunning = false;
 bool pressed = false;
 bool forceChange = false;
+
+DateTime getCurrent()
+{
+  if ( rtcRunning )
+    return rtc.now();
+  else
+    return compileTime.unixtime() + millis()/1000; 
+}
+
 /*******************************************************************************
 *******************************************************************************/
 void loop() {
 
-  current = rtc.now();
+  current = getCurrent();
+  bool next = false;
   
   switch ( mode )
   {

{
  for ( int i = 0; i < NEOPIXEL_LEDS; i++ )
    strip.setPixelColor(i,0);
}
/*******************************************************************************
*******************************************************************************/

    prevHours = newHours;
  }

  if ( millis() % 1000 == 0 )
  {
    DEBUG_PRINT( F("Wakey - current: "));
    DEBUG_PRINT( (int)wakeyMin );
    DEBUG_PRINT( F("min - "));
    DEBUG_PRINT( (int)currentMin );
    DEBUG_PRINT( F("min and diff is "));
    DEBUG_PRINT( (int)diffMin );
    DEBUG_PRINT( F("min and show is "));
    DEBUG_PRINTLN( show );
  }

  if ( show )
    strip.show();
