WIZnet / TCPClient_HelloWorld_WIZwiki-W7500 Featured

Weather info from OPenweathermap.org with TCPClient on WIZwiki-W7500

Dependencies:   WIZnetInterface mbed

Fork of TCPClient_HelloWorld_WIZwiki-W7500 by Lawrence Lee

Prerequisite

This example is for obtainning and printting data from server(OpenWeatherMap). WIZwiki-W7500 is TCP client mode.

To implement this function, you need a Platform board, network Interface board.


Hardware Configuration

WIZwiki-W7500 Pin map

pin map


Software

Select the city

    char http_cmd0[] = "GET /data/2.5/weather?q=Seoul,kr&appid=";
    char http_cmd1[] = API_key;
    char http_cmd2[] = " HTTP/1.0\n\n";
    
    sock.send_all(http_cmd0, sizeof(http_cmd0)-1);
    sock.send_all(http_cmd1, sizeof(http_cmd1)-1);
    sock.send_all(http_cmd2, sizeof(http_cmd2)-1);

Caution

This example requires an API key that can be obtained by signning up to the openweathmap site. //

mbed.bld

Committer:
jcm931213
Date:
4 months ago
Revision:
3:7b25a01a7f62
Parent:
1:2f7108c02fc9

File content as of revision 3:7b25a01a7f62:

https://mbed.org/users/mbed_official/code/mbed/builds/856d2700e60b