 	batteriesStopped = 0;
 	startFanDelay = false;
 	digitalWrite(fanPin,HIGH); // turn on the fan
+	//clear serial buffer of any old data
+	while (Serial.available()){
+	Serial.read();
+	}
 	Serial.println(F("START START"));
+	currentDataString = "";
+	currentDataStringComplete = false;
 }
 void testForFiles(){// make sure there are files to prevent webpage errors
 

unsigned long fanStopAt = 0;

void setup() {
  system_update_cpu_freq(80);	// 80 or 160
  system_phy_set_max_tpw(35); // 0 - 82 radio TX power
  pinMode(wifiLEDPin,OUTPUT);
  pinMode(fanPin,OUTPUT);

  checkFanState();
}

void setupAP(){
  const char WiFiAPPSK[] = "12345678";
  WiFi.mode(WIFI_AP);
  const char *ssid = "BatteryTester";
