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.

  • WIZwiki-W7500 from WIZnet (Platform board and Ethernet I/F 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. //

History

Revert mac_addr and eth.init default tip

2017-04-06, by jcm931213 [Thu, 06 Apr 2017 12:13:11 +0000] rev 3

Revert mac_addr and eth.init


ADD UART declaration, Input portion of API key; DELETE mac_addr

2017-04-06, by jcm931213 [Thu, 06 Apr 2017 11:50:11 +0000] rev 2

ADD UART declaration, Input portion of API key; DELETE mac_addr


add missed Libs

2015-06-29, by joon874 [Mon, 29 Jun 2015 00:43:27 +0000] rev 1

add missed Libs


TCP Client Example to get weather info on WIZwiki-W7500

2015-06-25, by joon874 [Thu, 25 Jun 2015 03:01:49 +0000] rev 0

TCP Client Example to get weather info on WIZwiki-W7500