TCP Client, WIZwiki-W7500. It will get weather of South Korea from openweathermap.org
Dependencies: WIZnetInterface mbed
Fork of TCPClient_HelloWorld by
Revision 4:19ee5010a9e9, committed 2016-11-04
- Comitter:
- jh_ndm
- Date:
- Fri Nov 04 07:38:15 2016 +0000
- Parent:
- 3:2a5770257d44
- Commit message:
- asdwfe
Changed in this revision
WIZnetInterface.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2a5770257d44 -r 19ee5010a9e9 WIZnetInterface.lib --- a/WIZnetInterface.lib Fri Nov 04 03:02:15 2016 +0000 +++ b/WIZnetInterface.lib Fri Nov 04 07:38:15 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/jh_ndm/code/WIZnetInterface/#6feeaebad180 +https://developer.mbed.org/users/jh_ndm/code/WIZnetInterface/#fc14e4330419
diff -r 2a5770257d44 -r 19ee5010a9e9 main.cpp --- 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)) {