 }
 
 int check_calibrated(String args) {
-  //Serial.println(executeRequest(PH_ADDRESS,"Cal,?"));
-  //Serial.println(executeRequest(PH_ADDRESS,"Status"));
-  //Serial.println(executeRequest(ORP_ADDRESS,"Cal,?"));
-  //Serial.println(executeRequest(ORP_ADDRESS,"Status"));
+  Serial.println("Ph:");
+  Serial.println(executeRequest(PH_ADDRESS,"Cal,?"));
+  Serial.println(executeRequest(PH_ADDRESS,"Status"));
+  Serial.println("ORP:");
+  Serial.println(executeRequest(ORP_ADDRESS,"Cal,?"));
+  Serial.println(executeRequest(ORP_ADDRESS,"Status"));
   return 0;
 }
 

}

void loop() {
  if (millis() > nextSampleTime) {
    measure_temp();
    compensate_temp_ph();
    measure_ph();
    measure_orp();
    measure_wifi();
    nextSampleTime = millis() + SAMPLE_INTERVAL;
    soc = lipo.getSOC();
  }
  if(millis() > nextSleepTime) {
    Particle.publish("waterdata", water_data(), PRIVATE);
    if(soc <= 10)
      sleepInterval = 60 * 15;
    else if(soc <= 20)
      sleepInterval = 60 * 10;
    else
      sleepInterval = 60 * 5;
    nextSleepTime = millis() + (sleepInterval * 1000) + WAKE_INTERVAL;
    executeRequest(PH_ADDRESS,"Sleep");
    executeRequest(ORP_ADDRESS,"Sleep");
    digitalWrite(POWER, LOW);
    System.sleep(SLEEP_MODE_DEEP,sleepInterval);
  }
}

String water_data() {
  return String::format("{\"temperature\":%f,\"ph\":%f,\"orp\":%f,\"soc\":%f,\"wifi\":%d}",temp,ph,orp,soc,wifi);
}

void measure_ph() {

    wifi = (int)((-wifi_db / 127)*100);
}

int switchcalibrationmode(String arg) {
  calibrationmode = !calibrationmode;
}

int calibrate_ph(String arg) {
  String commandString = String("Cal");
  commandString.concat(",");
