
Team 6
Dependencies: HTTPClient PowerControl SNICInterface_mod mbed-rtos mbed
Fork of HTTPClient_WiFi_HelloWorld by
Revision 8:846dfefd3110, committed 2015-02-15
- Comitter:
- daisukekmr
- Date:
- Sun Feb 15 01:08:28 2015 +0000
- Parent:
- 7:bf74da76618b
- Child:
- 9:95ab3243d929
- Commit message:
- HTTP?PIR????????????; Value???double???(???)
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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) {