         sprintf(pwmInfo, " %2.2f", (pidOutput / 255) * 100);
         
         // Log to the serial
+        Serial.println("---");
         Serial.println(tempInfo);
         Serial.println(pwmInfo);
+        Serial.println(pointInfo);
         
         // SparkCore: publish
         Spark.publish("tempInfo", tempInfo);
+        Spark.publish("pointInfo", pointInfo);
         Spark.publish("pwmInfo", pwmInfo);
         
         // Save timestamp of the event
         lastEventTimestamp = millis();
     }
   
-    // Control relay
-    analogWrite(relayPin, pidOutput);
 }
 
 
 // set point temperature
-int setPointTemperature(String pointTemperatureStr)
+int setPointTemperature(String command)
 {
-    char info[64];
-    
+    Serial.println("setPointTemperature called");
+
     // Convert to double
-    pointTemperature = atof(pointTemperatureStr.c_str());
-    
-    // Log to the serial
-    sprintf(info, "Point is set to: %2.2f", pointTemperature);
-    Serial.println(info);
+    pointTemperature = (double) command.toInt();
+
+    Serial.println("Point temperature set");
+    Serial.println(pointTemperature);
     
     return 1;
 }

    myPID.SetMode(AUTOMATIC);
    
    // Last event timestamp
    lastEventTimestamp = 0;
}
 
 // Loop
void loop() {
    
    // Searching for the ds18b20 device
    if(!ds18b20.search()){
        
        // Log to the serial
        Serial.println("No more addresses.");

        ds18b20.resetsearch();
        delay(250);
        
        return;  
    }     
    
    
    // Send event to the SparkCloud
    if (millis() - lastEventTimestamp >= 1000) {

        // Actual temperature in celsius
        actualTemperature = ds18b20.getTemperature();

        // Compute PID
        if(myPID.Compute()) {
            
            // Control relay
            analogWrite(relayPin, pidOutput);
        }
        
        // Convert values for output
        // convert pidOutput to 0-100
