AxedaGo-mbed Demo - WIZwiki_W7500 or Platform+ W5500 (WIZnet) + Sensor (Photosell), This code tested on FRDM-KL25Z, LPCXpresso8324-MAX, NUCLEO_F103RB and WIZwiki_W7500

Dependencies:   AxedaGo-mbedNXP WIZnetInterface mbed

Fork of AxedaGo-mbed_WIZnetInterface by Soohwan Kim

Revision:
5:1b8ad120cf29
Parent:
4:22d6467147a5
Child:
6:1f7647c5691a
diff -r 22d6467147a5 -r 1b8ad120cf29 main.cpp
--- a/main.cpp	Tue Jun 24 15:40:21 2014 +0000
+++ b/main.cpp	Wed Jun 25 18:49:43 2014 +0000
@@ -79,9 +79,9 @@
             sock.connect("toolbox-stage-connect.axeda.com", 80);
  
             snprintf(http_cmd, http_cmd_sz,  "POST /ammp/data/1/%s!%s HTTP/1.1\r\nContent-Type: application/json\r\nContent-Length: 65\r\n\r\n{\"data\":[{\"di\":{\"oil_level\":%.2f, \"oil_level2\":%.2f}}]}\r\n\r\n", MODEL, SERIAL_NUM, oil_level, oil_level2);
-            sock.send_all(http_cmd, strlen(http_cmd)-1);
+            sock.send_all(http_cmd, http_cmd_sz-1);
     
-            while ( (returnCode = sock.receive(buffer, sizeof(buffer)-1)) > 0)
+            while ( (returnCode = sock.receive(buffer, buffer_sz-1)) > 0)
             {
                 buffer[returnCode] = '\0';
                 printf("Received %d chars from server:\n\r%s\n", returnCode, buffer);