This library provides data update method to Fastsensing.

Dependents:   SCP1000_Fastsensing

Revision:
1:3f52b4da889a
Parent:
0:f26c02be48f9
Child:
2:5e41a339e05c
Child:
5:e34ff2b4af3f
--- a/Fastsensing.cpp	Mon Mar 20 01:28:59 2017 +0000
+++ b/Fastsensing.cpp	Tue Apr 04 06:17:45 2017 +0000
@@ -1,3 +1,8 @@
+/*
+*   Created by Akira Kashihara <akira@fastsensing.com>
+*   Description : You can upload sensing data Fastsensing and display them.
+*                 This Library needs your device ID, channel ID and each data value.
+*/
 #include "Fastsensing.h"
 
 int Fastsensing::updateData(char *deviceId, char *channelId, double data)
@@ -39,12 +44,13 @@
     for(int i = 0; i < 3; i++) {                                //Create request URL
         if(i == 0) delim = '?';                                 //first query is connected with ?
         else delim = '&';                                       //After second, query is connected with &
-        sprintf(query, "%c%s=%.1f",delim, channelId[i], data[i]); //Create Query String
+        sprintf(query, "%c%s=%.4f",delim, channelId[i], data[i]); //Create Query String
         strcat(reqUrl, query);                                  //Concatenate reqUrl and query
     }
     printf("%s\n", reqUrl);
     int res = http.get(reqUrl, resResult, 300);                 //Send request is reqUrl as get method and get Response Result. Time out is 5000
-    printf("%d\n", res);
+    //printf("%d\n", res);
+    //printf("%d\n", http.getHTTPResponseCode());
     if(!res) {                                                  //If session is completed
         eth.disconnect();                                       //EthernetInterface closed
         printf("disconnected\n");