Upload to cosm (pachube) from mbed.

Dependencies:   EthernetInterface SCP1000 WebSocketClient mbed-rtos mbed

thank you for http://mbed.org/forum/bugs-suggestions/topic/3956/ thread.

Use AMS302,LM61BIZ,CHS-GSS,SCP-1000 and StarBoard Orange.

Revision:
4:2e051261aef7
Parent:
3:80228f6bc21a
diff -r 80228f6bc21a -r 2e051261aef7 main.cpp
--- a/main.cpp	Sat Feb 09 18:02:10 2013 +0000
+++ b/main.cpp	Sat Feb 09 20:10:09 2013 +0000
@@ -86,7 +86,7 @@
 
         myled = 1;
         // If you want, change the ID, Number of digits.
-        sprintf (cms,"{\"method\" : \"put\",\"resource\" : \"%s\",\"params\" : {},\"headers\" : {\"X-ApiKey\":\"%s\"},\"body\" :{\"version\" : \"1.0.0\",\"datastreams\" : [{\"id\" : \"0\",\"current_value\" : \"%4.0f\"},{\"id\" : \"1\",\"current_value\" : \"%4.0f\"},{\"id\" : \"2\",\"current_value\" : \"%3.0f\"},{\"id\" : \"3\",\"current_value\" : \"%3.0f\"}]},\"token\" : \"0x%d\"}\r\n",feed,apikey,r_hpa,r_light,r_temp,r_humid,token);
+        sprintf (cms,"{\"method\" : \"put\",\"resource\" : \"%s\",\"params\" : {},\"headers\" : {\"X-ApiKey\":\"%s\"},\"body\" :{\"version\" : \"1.0.0\",\"datastreams\" : [{\"id\" : \"0\",\"current_value\" : \"%4.0f\"},{\"id\" : \"1\",\"current_value\" : \"%3.0f\"},{\"id\" : \"2\",\"current_value\" : \"%3.0f\"},{\"id\" : \"3\",\"current_value\" : \"%4.0f\"}]},\"token\" : \"0x%d\"}\r\n",feed,apikey,r_light,r_temp,r_humid,r_hpa,token);
  
         printf ("%s\r\n",cms);
         token++;