     CurrentMode = MODE_AUTO;
   }
 
+  // Display greeting on LCD for 1 second
   delay(1000);
   updateLCD();
 }

  updateDoorStatus(DOOR_STATIONARY, DOOR_POSITION_DOWN);
}

// Moves door either up or down. 
// If revolutions is positive, door goes up; if negative, door goes down.
void moveDoor(int revolutions) {
  // Set the motor target position i.e. number of steps to move
  Motor.move(revolutions * (long) STEPS_PER_REVOLUTION);
  
  // Start stepping motor
  // for (int rev = 1; rev <= revolutions; rev++) {
  while (true) {

      stopDoor();
    }
  } else if ( CurrentMode == MODE_SET_OPEN_THRESH ) {
    LightThreshUp += LIGHT_THRESH_CHANGE_INCREMENT;
  } else if ( CurrentMode == MODE_SET_CLOSE_THRESH ) {
    LightThreshDown += LIGHT_THRESH_CHANGE_INCREMENT;
  } else if ( CurrentMode == MODE_SET_CLOCK_CLOSE_HOUR_THRESH ) {
    ClockThreshDown = TimeSpan(0, ClockThreshDown.hours() + 1, ClockThreshDown.minutes(), 0);
    EEPROM.write(CLOCK_HOUR_THRESH_DOWN_ADDRESS, ClockThreshDown.hours());
  } else if ( CurrentMode == MODE_SET_CLOCK_CLOSE_MIN_THRESH ) {
    ClockThreshDown = TimeSpan(0, ClockThreshDown.hours(), ClockThreshDown.minutes() + CLOCK_MIN_INCREMENT, 0);
    EEPROM.write(CLOCK_MIN_THRESH_DOWN_ADDRESS, ClockThreshDown.minutes());
  } else if ( CurrentMode == MODE_SET_CLOCK_OPEN_HOUR_THRESH ) {
    ClockThreshUp = TimeSpan(0, ClockThreshUp.hours() + 1, ClockThreshUp.minutes(), 0);
    EEPROM.write(CLOCK_HOUR_THRESH_UP_ADDRESS, ClockThreshUp.hours());
  } else if ( CurrentMode == MODE_SET_CLOCK_OPEN_MIN_THRESH ) {
    ClockThreshUp = TimeSpan(0, ClockThreshUp.hours(), ClockThreshUp.minutes() + CLOCK_MIN_INCREMENT, 0);
    EEPROM.write(CLOCK_MIN_THRESH_UP_ADDRESS, ClockThreshUp.minutes());
  }
}

