   }
   digitalWrite(stir, LOW);
 }
+
+//NOT USED//
+//this was for a slow fillup to avoid bubbling over
 void fillup(){
   loading(7);//12 times for 12 hours
   loading(9);

  decant(6);
  delay(2000);
}

void oldsequence(){
  DateTime now = rtc.now();
  realstarttime = now.unixtime();
  if (tank<20){
    fillup();
  }
  now = rtc.now();
  delay(2000);
  aeration(240, 19);
  delay(2000);
  settle(60, 19);
  delay(2000);
  skim(60);
  delay(2000);
  settle(120,19);
  delay(2000);
  decant(6);
  delay(2000);
  now= rtc.now();
  float current = now.unixtime();
  while (current-realstarttime<86400){
    rest(3);
    now= rtc.now();
    current = now.unixtime();
  }

  delay(2000);
}
void loading(int h){//takes 1 hr to fill before continuing
   DateTime now = rtc.now();
  begintime = now.unixtime();

  measurevol();
}
uint8_t i=0;

//This function takes an average of tank volume readings to get a smoothed value when "measurevol();" is used
void measurevol(){
  int junk = analogRead(depth);
  float tank1 = analogRead(depth)*0.421569-28.4559;
