TCP Client, WIZwiki-W7500. It will get weather of South Korea from openweathermap.org

Dependencies:   WIZnetInterface mbed

Fork of TCPClient_HelloWorld by jehoon song

Revision:
4:19ee5010a9e9
Parent:
2:00baa8aaaaf1
--- a/main.cpp	Fri Nov 04 03:02:15 2016 +0000
+++ b/main.cpp	Fri Nov 04 07:38:15 2016 +0000
@@ -2,7 +2,7 @@
 #include "EthernetInterface.h"
 #include "cJSON.h"
 
-//AnalogIn Gas(A2);
+AnalogIn Gas(A2);
 int socketPort = 8000;
 int httpPort = 80;
 
@@ -18,7 +18,7 @@
 bool closeConnect(TCPSocketConnection &conn);
 
 float val;
-int mathtest;
+//int mathtest;
 bool out=false;
 
 int main() { 
@@ -45,9 +45,9 @@
     while(true)
     {   
         wait(1);
-        //val = Gas.read()*1023;
-        //int mathtest = ceil(val);//math.h
-        //pc.printf("Gas.read=%02f,n=%d\r\n",val,mathtest);
+        val = Gas.read()*1023;
+        int mathtest = ceil(val);//math.h
+        pc.printf("Gas.read=%02f,n=%d\r\n",val,mathtest);
         pc.printf("start http_post\r\n");
         if(http_POST(conn))
         {