This posting shows how to use API of OpenWeatherMap site
that provides weather information using WizArduino MEGA WiFi.
1. OpenWeatherMap API Key 획득
In order to use API, we need to acquire authority for use. We can usually access the Host system and use the resource using key issued by the Host system. We have to sign up on OpenWeatherMap website to get an API key.
Once we sign up, we can get an API key as shown below.
2. Installing Library
WizArduino MEGA WiFi requires WizFi310 Library to use WiFi function.
WizFi310 Library can be installed after searching ‘Sketch -> Include Library -> Manage Libraries..’.
3. Code 수정
Source code: http://wiznetian.com/article/wizarduino-wifi%EB%A1%9C-openweathermap-%EC%82%AC%EC%9D%B4%ED%8A%B8%EC%97%90%EC%84%9C-%EB%82%A0%EC%94%A8%EB%8D%B0%EC%9D%B4%ED%84%B0-%EA%B0%80%EC%A0%B8%EC%98%A4%EA%B8%B0/
(based on Arduino 1.8.1 version.)
The code needs some modification.
First, enter the API key from openweathermap site.
Configure the network by entering accessible wifi name and password. If the region isn’t Seoul in Korea, we can change variable value such as city and country to change the region.
Use the link below to find the city you want ^^
You can get the following results by turning on the serial monitor after uploading.
If you modify the API Key and access the above site with a web browser, you can check the weather information as text data as shown below. Among them, “temp” : 273.66,, “description” : “broken clouds” part has been extracted. If you want other data, you can modify the code to extract.
To extract other data, please change the part as shown below.