 
 void setPValue(double value) {
   pValue = value;
-  Serial << STATMSG << "Set P value to " << pValue << ENDMSG;
+  /* Serial << STATMSG << "Set P value to " << pValue << ENDMSG; */
   temperaturePID.SetTunings(pValue, iValue, 0);
 }
 
 void setIValue(double value) {
   iValue = value;
-  Serial << STATMSG << "Set I value to " << iValue << ENDMSG;
+  /* Serial << STATMSG << "Set I value to " << iValue << ENDMSG; */
   temperaturePID.SetTunings(pValue, iValue, 0);
 }
     

void process(YunClient client) {
  String command = client.readStringUntil('/');

  switch (command) {
  case "pump":
    pumpCommand(client);
    break;
  case (temperature):
    temperatureCommand(client);
  default:
    int i;
  }
}

  else {
    value = pumpIsOn;
  }
  
  // Reply with current value
  client.println(value);
  Bridge.put("pump", String(value));
}

void temperatureCommmand(YunClient client) {
  // Get current temperature and convert to string
  String tempString = String(temperatureToInt(temperature));
  
  // Reply with temperature
  client.println(tempString);
  Bridge.put("temperature", tempString);
}

void heaterCommand(YunClient client) {
  int value;
  
  // Check if we have an argument to command
  // If so it is of form int, where int is duty cycle in percent
  // Else return current value
  if (client.peek() != -1) {
    value = client.parseInt();
    setDutyCycle(value);
  }
  else {
    value = (int) dutyCycle;
  }

  // Reply with current duty cycle
  client.println(value);
  Bridge.put("dutycycle", String(value));
}

/* void heater_msg() { */
/*   /\* Serial << STATMSG << "Heater msg received" << ENDMSG; *\/ */
/*   while (cmdMessenger.available()) { */
/*     char buf[350] = {'\0'}; */
/*     cmdMessenger.copyString(buf, 350); */
/*     // Its of the form int, where int is percent */
/*     // duty cycle */
/*     setDutyCycle(atoi(buf)); */
/*   } */
/* } */

/* void setPIDonoff_msg() { */
/*   /\* Serial << STATMSG << "Set PID on off msg received" << ENDMSG; *\/ */
/*   while (cmdMessenger.available()) { */
/*     char buf[350] = {'\0'}; */
/*     cmdMessenger.copyString(buf, 350); */
/*     if (strncmp(buf, "1", 1) == 0) { */
/*       temperaturePID.SetMode(AUTOMATIC); */
/*     } */
/*     else { */
/*       temperaturePID.SetMode(MANUAL); */
/*     } */
/*   } */
/* } */

/* void getall_msg() { */
/*   /\* Serial << STATMSG << "All parameters requested" << ENDMSG; *\/ */
/*   Serial << GETALLMSG << temperature << "," << dutyCycle << "," \ */
/* 	 << setpoint << "," << temperaturePID.GetMode() \ */
/* 	 << "," << pumpIsOn << "," << pValue << "," << iValue << ENDMSG; */
/*   delay(10); */
/* } */

/* void changeSET_msg() { */
/*   /\* Serial << STATMSG << "Change in setpoint requested" << ENDMSG; *\/ */
/*   while (cmdMessenger.available()) { */
/*     char buf[350] = {'\0'}; */
/*     cmdMessenger.copyString(buf, 350); */
/*     // Its of the form int, where int is percent */
/*     // duty cycle */
/*     setSetPoint(atoi(buf)); */
/*   } */
/* } */

/* void setP_msg() { */
/*   while (cmdMessenger.available()) { */
/*     char buf[350] = {'\0'}; */
/*     cmdMessenger.copyString(buf, 350); */
/*     // Its of the form int, where int is percent */
/*     // duty cycle */
/*     setPValue(atof(buf)); */
/*   } */
/* } */

/* void setI_msg() { */
/*   while (cmdMessenger.available()) { */
/*     char buf[350] = {'\0'}; */
/*     cmdMessenger.copyString(buf, 350); */
/*     // Its of the form int, where int is percent */
/*     // duty cycle */
/*     setIValue(atof(buf)); */
/*   } */
/* }     */

void arduino_ready() {
  // In response to ping. We just send a throw-away ack to say "im alive"
