       delay(20);
     }
 }
+void settlerest(float resttime){//rest time in ms
+  lcd.clear();
+  lcd.setCursor(0,0);
+  lcd.print("settle EST ");
+  lcd.setBacklight(VIOLET);
+  unsigned long startrest = millis();
+  digitalWrite(air, LOW);
+  digitalWrite(fill, LOW);
+  digitalWrite(decant, LOW);
+  
+  x=0;
+  while (x==0){
+      if (millis()-startrest > resttime){
+       x=1;
+      }
+      else if (millis()-startrest < resttime){
+       int timedisplay = round((resttime-(millis()-startrest))/1000);
+       lcd.setCursor(0,1);
+       lcd.print(timedisplay);lcd.print("sec  ");
+      }
+      delay(20);
+    }
+}
 void decantdrain(){//rest time in ms
   lcd.clear();
   lcd.setCursor(0,0);

  delay(2000);
  aeration();
  delay(2000);
  rest(30000);//3min
  delay(2000);
  decantdrain();
  delay(2000);
  rest(30000);//3min
}

void loop() {

  lcd.setCursor(0, 0);
  delay(100);
  lcd.setCursor(0,1);
  decantdrain();
  while (x<1){
   //partialempty();
   //aeration(60,17);
