Project Description

If you use the Open API, you can acquire the weather information. This posting explains how embedded device can acquire the weather information from OpenWeahterMap. The device is based on Cortex-M3 platform and using WizFi250 for WiFi connectivity.

For more detail about OpenWeatherMap, clilck below link.

openweathermap

open_weather

 

OpenWeatherMap API

JSON format API

GET /data/2.5/weather?q=Seoul HTTP/1.1\r\n Host: api.openweathermap.org\r\n\r\n

XML format API

GET /data/2.5/weather?q=Seoul&mode=xml HTTP/1.1\r\n Host: api.openweathermap.org\r\n\r\n

 

Below is the WizFi250 AT commands to acquire the weather information.

The message from WizFi250 is as below

If above message is well transmitted to OpenWeatherMap server, below response message in JSON format can be received.

Below code can be programmed to cortex-M3

After executing the code, you can get the result as below.

open-weather_1