 TimeSpan ClockThreshDown;                  // Time below which we close door
 // Used for motor 
 bool MotorEnabled;                         // Is motor enabled or not?
+long RevolutionsToChange  = REVOLUTIONS_TO_CHANGE;
 
 // Initialize the LCD
 LiquidCrystal Lcd(PIN_LCD_RS, PIN_LCD_ENABLE, PIN_LCD_D4, PIN_LCD_D5, PIN_LCD_D6, PIN_LCD_D7);


// Door-specific constants
// Number of revolutions needed to change door position
// Should be empirically determined since it depends on lenght of thread rod.
const long REVOLUTIONS_TO_CHANGE             = 170;

// Pins
// Arduino Uno / Buttons

// If revolutions is positive, door goes up; if negative, door goes down.
void moveDoor(long revolutions) {
  // Set the motor target position i.e. number of steps to move
  long stepsToMove = revolutions * STEPS_PER_REVOLUTION;
  Motor.move(stepsToMove);
  
  // Local step counter
  long stepsMoved = 0;

  // Start stepping motor
  Serial.print("Starting to take steps: ");
  Serial.print(stepsToMove);
  Serial.print(" (");
  Serial.print(revolutions);
  Serial.println(")");
  while (true) {

    // Handle buttons to allow abort
