testing

Dependencies:   HTTPClient PowerControl SNICInterface_mod mbed-rtos mbed

Fork of Fx0Hackson by Daisuke Kimura

Revision:
8:846dfefd3110
Parent:
7:bf74da76618b
Child:
9:9fc77f7685b7
--- a/main.cpp	Sun Feb 15 00:27:59 2015 +0000
+++ b/main.cpp	Sun Feb 15 01:08:28 2015 +0000
@@ -45,12 +45,12 @@
                 , DEMO_AP_SECUTIRY_KEY
                 , strlen(DEMO_AP_SECUTIRY_KEY) );
     wait(0.5);
-    wifi.setIPConfig( true );    
-    wait(0.5);    
+    wifi.setIPConfig( true );
+    wait(0.5);
     printf("IP Address is %s\n", wifi.getIPAddress());
     
     //define var
-    int value;
+    double value;
     char* sensortype;
     
     while(1)
@@ -62,7 +62,7 @@
         //GET data
         printf("\nTrying to fetch page...\n");
         char buf[128];
-        sprintf(buf, "http://192.168.179.7/put?type=%s&value=%d",sensortype, value);
+        sprintf(buf, "http://192.168.179.7/put?type=%s&value=%lf",sensortype, value);
         int ret = http.get(buf, str, 128);
         if (!ret)
         {
@@ -82,7 +82,7 @@
         //GET data
         printf("\nTrying to fetch page...\n");
         char buf[128];
-        sprintf(buf, "http://192.168.179.7/put?type=%s&value=%d",sensortype, value);
+        sprintf(buf, "http://192.168.179.7/put?type=%s&value=%lf",sensortype, value);
         int ret = http.get(buf, str, 128);
         if (!ret)
         {