   lcd.print(tank);
   //write conditions for running sequence here and add functions
   while (x<1){
-   loading();
-    x++;}
+   normalsequence();//decant(4);//loading();
+    x++;}delay(20000);
   }
 
 void fill(int lvl){//check depth and fill until level is 25gal plus stir

  aeration(15, 4);
  rest(45);
}
void normalsequence(){
  DateTime now = rtc.now();
  starttime = now.unixtime();
  //fill(10);
  now = rtc.now();
  starttime = now.unixtime();
  //fill(13);
  now = rtc.now();
  starttime = now.unixtime();
  fill(16);
  now = rtc.now();
  starttime = now.unixtime();
  fill(19);
  now = rtc.now();
  starttime = now.unixtime();
  fill(22);
  now = rtc.now();
  starttime = now.unixtime();
  fill(25);
  now = rtc.now();
  delay(5000);
  aeration(240, 24);
  delay(5000);
  settle(60, 24);
  delay(5000);
  skim(60);
  delay(5000);
  settle(120,24);
  delay(5000);
  decant(6);
  delay(5000);
  //rest(5);
  delay(5000);
}
void loading(){
   DateTime now = rtc.now();
  begintime = now.unixtime();
   measurevol();
   fill(18);
   periodicaeration(15);
   now = rtc.now();
  float current = now.unixtime();
  while (current-begintime<3600000){//1hr
    now = rtc.now();
    current = now.unixtime();
    delay(15000);
    lcd.setCursor(0,0);
  lcd.print("Loading");
    
  }
  
  fill(19);
}

int depth = A0;
int x=0;
float starttime;
float realstarttime;
float begintime;
float tank;
float airtimer;
