     }
      Serial.print(".");
   }
+  hitBottom = true;
   Serial.println();
 
   // send low to door close motor pin

  }
}

void drawDelaySetMenu(){
  lcd.clear();
  lcd.setCursor(0, 0);
  if(inPreDelayMenu){
    lcd.print("Pre: ");
  } else if(inPostDelayMenu){
    lcd.print("Post: ");
  }
  lcd.print(delayVal);
  lcd.print(" mins");
  
}

void updateDelayValLoop(){
  encState eState = encoder.read();
  if (eState == ENC_DEC) {
    if (delayVal == 0) {
      delayVal = MAX_DELAY_MINUTES - 1;
    } else {
      delayVal = (delayVal - 1);
    }
    drawDelaySetMenu();
  } else if (eState == ENC_INC) {
    delayVal = (delayVal + 1) % (MAX_DELAY_MINUTES);
    drawDelaySetMenu();
  }
}

void updateDelaySettings(){

  if(inPreDelayMenu){
    delayVal = delay_time_before_sunrise;
  } else if(inPostDelayMenu){
    delayVal = delay_time_after_sunset;
  }
  drawDelaySetMenu();
  while(!setDelayValue){
    updateDelayValLoop();
    menuButton.read();
    if(menuButton.wasReleased()){
      // TODO: set delay value in EEPROM
      setDelayValue = true;
    }
  }
}

void updateSetupMenu(){
  lcd.setCursor(0, 0);
  encState eState = encoder.read();

    }
    Serial.print(".");
  }
  hitTop = true;
  Serial.println();

  // send low to door open motor pin
