Hardware components | ||||||
| × | 1 | ||||
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
Software apps and online services | ||||||
![]() |
| |||||
|
Weather monitoring device is a useful tool for providing the atmospheric information of the area regarding temperature, humidity, wind speed, precipitation, UV index, etc. Weather of a particular area describes a lot about the habitat, climate conditions and accumulating these data over a definite period of time could be used to predict future climatic changes. In this project, I have used OLED display that displays the temperature(in C), wind speed(m/s), general description of the weather and graphical icons to describe the weather via API calls.
Working1. Sending API request and Obtaining the Json responseThe Weather monitoring device obtains the weather info by sending the API request to the server in return for a JSON response. For my project, I have used the weatherbit API's current weather API as it is free and ideal for my requirements.
In-order to use this API you need to first set up an account on the weatherbit.io. Upon creating, you will need to request for an API key which will take about 30 mins to get activated. Keep the API key private for your own use as it has limited usage.
After obtaining the API key, you can check the JSON response by sending the request(see documentation) on your web browser or from tools such as postman to view the JSON format in a structured manner. This is an example of my api request-
http://api.weatherbit.io/v2.0/current?city=Goa&country=IN&units=M&key="Your API Key".
The JSON response of this request is as follows-
{
"data": [
{
"rh": 91.3,
"pod": "d",
"lon": 73.78869,
"pres": 988.487,
"timezone": "Asia/Kolkata",
"ob_time": "2020-08-05 12:53",
"country_code": "IN",
"clouds": 100,
"ts": 1596631998,
"solar_rad": 30.8,
"state_code": "33",
"city_name": "Marmagao",
"wind_spd": 8.05612,
"wind_cdir_full": "west",
"wind_cdir": "W",
"slp": 994.225,
"vis": 2,
"h_angle": 64.3,
"sunset": "13:42",
"dni": 666.14,
"dewpt": 23.9,
"snow": 0,
"uv": 1.35293,
"precip": 0,
"wind_dir": 269,
"sunrise": "00:47",
"ghi": 308.26,
"dhi": 76.82,
"aqi": 51,
"lat": 15.40927,
"weather": {
"icon": "c04d",
"code": 804,
"description": "Overcast Clouds"
},
"datetime": "2020-08-05:12",
"temp": 25.4,
"station": "VAJJ",
"elev_angle": 20.94,
"app_temp": 26.4
}
],
"count": 1
}
Similarly, to obtain weather info of your location, you just need to change the city and country name.
The JSON response(as u can see above) contains substantial amount of information and only a few are required for us. To obtain only the necessary information from the JSON, we must do parsing.
2. Parsing of JSON responseFor parsing the required information, I have used the ArduinoJson library. For this, I had to obtain the json buffer size and create a json object for the attributes that I want. I have use the ArduinoJson assistant to calculate the buffer size and to obtain the value of the keys I want to display. The buffer size and the parsing program is obtained by pasting the JSON response to the ArduinoJson assistant.
I have created the widgets as it is an attractive way to represent current weather conditions and gives an appealing look on the OLED display. Each of these icons are taken from the documentation and some from Google searches. Listed below are the weather icons that I have used-
All the icons have been cropped to a resolution less than(or close to) 57*57 pixels to be accomodated on the OLED display and have been converted to their respective array bytes using the image2cpp tool. The array bytes of an image looks like this-
Before merging into the main program, I have first tested all the icons on the display to check the final image size and contrast. The result is as below-
After ensuring each of the icons are displayed perfectly, I have allotted these icons to their respective icon codes(check documentation).Ex: code no between 200 and 202 displays "thunderstorm with rain" icon, between 500 and 522 displays "rain" icon and so on.
Final ExecutionThe sketch requires the following libraries that can be installed from the Arduino IDE's Library manager- Adafruit SSD1306 by Adafruit, Adafruit GFX Library by Adafruit, ArduinoJson(Version 5).
Make sure to enter the weatherbit io's API key as well as SSID and Password of your WiFi router before uploading the sketch.
The main display provides the following information obtained from the Weatherbit api-
/////////////////////////////////
/// OLED Weather Monitoring ////
/// by Shubham Santosh //////
//////////////////////////////
#include<ESP8266WiFi.h>
#include<ESP8266HTTPClient.h>
#include<ArduinoJson.h>
#include<Adafruit_SSD1306.h>
#include<Adafruit_GFX.h>
#include<SPI.h>
// Array bytes of the Weather icons
const unsigned char thunderstorm_rain [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xef, 0x1f, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xc7, 0x18, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x18, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x01, 0xff, 0xf0,
0xff, 0xff, 0xfe, 0x01, 0xe0, 0x00, 0x87, 0xf0, 0xff, 0xff, 0xf8, 0x00, 0x70, 0x00, 0x07, 0xf0,
0xff, 0xff, 0xe0, 0x00, 0x18, 0x00, 0x0f, 0xf0, 0xff, 0xff, 0xe0, 0x00, 0x0c, 0x00, 0x3f, 0xf0,
0xff, 0xff, 0xc0, 0x00, 0x04, 0x00, 0x3f, 0xf0, 0xff, 0xff, 0x80, 0x00, 0x06, 0x00, 0x1f, 0xf0,
0xff, 0xff, 0x00, 0x00, 0x06, 0x00, 0x03, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x03, 0xf0,
0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x1f, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x3f, 0xf0,
0xff, 0xfc, 0x00, 0x00, 0x03, 0x00, 0x3f, 0xf0, 0xff, 0xf0, 0x00, 0x00, 0x03, 0xf0, 0x0f, 0xf0,
0xff, 0xc0, 0x00, 0x00, 0x00, 0x38, 0x07, 0xf0, 0xff, 0x80, 0x00, 0x00, 0x00, 0x0f, 0xcf, 0xf0,
0xff, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf0,
0xfc, 0x00, 0x7f, 0x80, 0x00, 0x00, 0xff, 0xf0, 0xfc, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x7f, 0xf0,
0xfc, 0x01, 0x80, 0xc0, 0x00, 0x00, 0x7f, 0xf0, 0xfc, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x7f, 0xf0,
0xfc, 0x03, 0x00, 0xc0, 0x00, 0x00, 0x7f, 0xf0, 0xfc, 0x03, 0x00, 0x80, 0x00, 0x00, 0x7f, 0xf0,
0xfc, 0x02, 0x03, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0xfe, 0x06, 0x03, 0x00, 0x00, 0x00, 0x7f, 0xf0,
0xfe, 0x06, 0x07, 0x00, 0x00, 0x00, 0xff, 0xf0, 0xff, 0x04, 0x07, 0xf0, 0x00, 0x01, 0xff, 0xf0,
0xff, 0x8c, 0x00, 0xf8, 0x00, 0x01, 0xff, 0xf0, 0xff, 0xc8, 0x00, 0x18, 0x00, 0x03, 0xff, 0xf0,
0xff, 0xf8, 0x00, 0x38, 0x00, 0x0f, 0xff, 0xf0, 0xff, 0xf8, 0x00, 0x78, 0x00, 0x7f, 0xff, 0xf0,
0xff, 0xfc, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xc0, 0xe7, 0xe7, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xc1, 0xe3, 0xe3, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xc3, 0xc3, 0xc3, 0xff, 0xff, 0xf0,
0xff, 0xff, 0x87, 0xc3, 0xc3, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x87, 0xc7, 0xc7, 0xff, 0xff, 0xf0,
0xff, 0xff, 0x1f, 0x87, 0x87, 0xff, 0xff, 0xf0, 0xff, 0xff, 0x1f, 0x87, 0x87, 0xff, 0xff, 0xf0,
0xff, 0xfe, 0x3f, 0x87, 0x8f, 0xff, 0xff, 0xf0, 0xff, 0xfe, 0x7f, 0x8f, 0x8f, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0x8f, 0x8f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0
};
const unsigned char cloudy [] PROGMEM = {
// 'cloudy', 60x53px
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xfe, 0x07, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x7f, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xe0, 0x00, 0x3f, 0xff, 0xf0, 0xff, 0xff, 0xff, 0x80, 0x00, 0x1f, 0xff, 0xf0,
0xff, 0xff, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x0f, 0xff, 0xf0,
0xff, 0xff, 0xfe, 0x00, 0x00, 0x0f, 0xff, 0xf0, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x07, 0xff, 0xf0,
0xff, 0xff, 0xc0, 0x00, 0x00, 0x03, 0xff, 0xf0, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x3f, 0xf0,
0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x0f, 0xf0,
0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x07, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0,
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0,
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0,
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x03, 0xf0,
0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x07, 0xf0, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0,
0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0,
0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0,
0xff, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf0,
0xff, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf0,
0xff, 0x80, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf0,
0xff, 0xe0, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0
};
const unsigned char drizzle [] PROGMEM = {
// 'drizzle', 59x55px
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xfc, 0x01, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xf8, 0x00, 0x3f, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xc0, 0x00, 0x07, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xc0, 0x00, 0x07, 0xff, 0xff, 0xe0, 0xff, 0xfe, 0x07, 0xff, 0x80, 0xff, 0xff, 0xe0,
0xff, 0xfc, 0x1f, 0xff, 0xe0, 0x7f, 0xff, 0xe0, 0xff, 0xf8, 0x3f, 0xff, 0xf8, 0x7f, 0xff, 0xe0,
0xff, 0xf8, 0x3f, 0xff, 0xf8, 0x7f, 0xff, 0xe0, 0xff, 0xf0, 0x3f, 0xff, 0xfc, 0x7f, 0xff, 0xe0,
0xff, 0xe0, 0x3f, 0xff, 0xfe, 0x01, 0xff, 0xe0, 0xff, 0xe0, 0xff, 0xff, 0xfe, 0x00, 0x1f, 0xe0,
0xff, 0xe0, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xe0, 0xff, 0x81, 0xff, 0xff, 0xff, 0x00, 0x07, 0xe0,
0xff, 0x81, 0xff, 0xff, 0xff, 0xfe, 0x07, 0xe0, 0xff, 0x81, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xe0,
0xff, 0x81, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xe0, 0xfe, 0x01, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xe0,
0xfc, 0x01, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x60, 0xe0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x20,
0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x20, 0x83, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00,
0x83, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00,
0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x20, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x20,
0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x60, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x60,
0x83, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xe0, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xe0,
0xe0, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0x07, 0xe0, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0,
0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0,
0xff, 0xe0, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xf1, 0xff, 0x1f, 0xfb, 0xff, 0x0f, 0xe0,
0xff, 0x80, 0xfc, 0x0f, 0xe1, 0xfe, 0x0f, 0xe0, 0xff, 0x80, 0xfc, 0x0f, 0xc1, 0xfc, 0x0f, 0xe0,
0xff, 0x01, 0xf8, 0x1f, 0x81, 0xf8, 0x0f, 0xe0, 0xfe, 0x03, 0xf0, 0x3f, 0x07, 0xe0, 0x3f, 0xe0,
0xfc, 0x1f, 0xc3, 0xf8, 0x07, 0x80, 0xff, 0xe0, 0xfc, 0x7f, 0xc3, 0xf8, 0x1f, 0x81, 0xff, 0xe0,
0xfc, 0x7f, 0xc3, 0xf8, 0x3f, 0x87, 0xff, 0xe0, 0xfc, 0xff, 0xc7, 0xfc, 0x7f, 0x8f, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0
};
const unsigned char mist [] PROGMEM = {
// 'mist', 59x54px
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x1f, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xcc, 0x1c, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x1f, 0xe0,
0xff, 0xff, 0xfc, 0x01, 0xe0, 0x00, 0x0f, 0xe0, 0xff, 0xff, 0xf8, 0x00, 0x60, 0x00, 0x0f, 0xe0,
0xff, 0xff, 0xe0, 0x00, 0x30, 0x00, 0x1f, 0xe0, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x1f, 0xe0,
0xff, 0xff, 0xc0, 0x00, 0x08, 0x00, 0x1f, 0xe0, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x07, 0xe0,
0xff, 0xff, 0x00, 0x00, 0x04, 0x00, 0x07, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x02, 0x00, 0x07, 0xe0,
0xff, 0xff, 0x00, 0x00, 0x02, 0x00, 0x0f, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x02, 0x00, 0x3f, 0xe0,
0xff, 0xfe, 0x00, 0x00, 0x03, 0x00, 0x1f, 0xe0, 0xff, 0xf0, 0x00, 0x00, 0x03, 0x80, 0x0f, 0xe0,
0xff, 0xc0, 0x00, 0x00, 0x00, 0x60, 0x0f, 0xe0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x0c, 0x0f, 0xe0,
0xff, 0x80, 0x00, 0x00, 0x00, 0x07, 0xff, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xfe, 0x00, 0xbf, 0xff, 0x9e, 0x00, 0xff, 0xe0,
0xfe, 0x01, 0xff, 0xff, 0xff, 0x80, 0xff, 0xe0, 0xfe, 0x06, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0,
0xff, 0x06, 0x00, 0x00, 0x00, 0x40, 0xff, 0xe0, 0xff, 0x06, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0,
0xff, 0x83, 0x00, 0x00, 0x00, 0xc1, 0xff, 0xe0, 0xff, 0xc7, 0xff, 0xff, 0xff, 0x81, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xe0, 0xff, 0x80, 0x00, 0x00, 0x60, 0xc7, 0xff, 0xe0,
0xff, 0x00, 0x00, 0x00, 0x40, 0xff, 0xff, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0,
0xff, 0x80, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xf0, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xe0, 0xff, 0xe0, 0x00, 0x00, 0x07, 0xff, 0xff, 0xe0,
0xff, 0xe0, 0x00, 0x00, 0x07, 0xff, 0xff, 0xe0, 0xff, 0xf0, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0
};
const unsigned char rain [] PROGMEM = {
// 'rain', 59x55px
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xf8, 0x00, 0x01, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xff, 0xe0, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x3f, 0xff, 0xe0,
0xff, 0xff, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0xff, 0xff, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xe0,
0xff, 0xff, 0x80, 0x00, 0x00, 0x1f, 0xff, 0xe0, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xe0,
0xff, 0xe0, 0x00, 0x00, 0x00, 0x07, 0xff, 0xe0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0,
0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0,
0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0,
0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0,
0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0,
0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0,
0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x2f, 0xe0,
0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0,
0xff, 0xfe, 0x00, 0x00, 0x00, 0x03, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xe7, 0xfd, 0xff, 0x3f, 0xff, 0xe0, 0xff, 0xff, 0xe7, 0xf9, 0xff, 0x3f, 0xff, 0xe0,
0xff, 0xff, 0xe1, 0xf8, 0xfe, 0x1f, 0xff, 0xe0, 0xff, 0xff, 0xc1, 0xf8, 0xfe, 0x1f, 0xff, 0xe0,
0xff, 0xff, 0x87, 0xf1, 0xfc, 0x3f, 0xff, 0xe0, 0xff, 0xff, 0x07, 0xe1, 0xf0, 0x3f, 0xff, 0xe0,
0xff, 0xff, 0x0f, 0xe3, 0xe0, 0x7f, 0xff, 0xe0, 0xff, 0xfe, 0x0f, 0xc3, 0xe0, 0x7f, 0xff, 0xe0,
0xff, 0xfc, 0x1f, 0xc7, 0xc0, 0xff, 0xff, 0xe0, 0xff, 0xfe, 0x3f, 0xc7, 0xe1, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0
};
const unsigned char sleet [] PROGMEM = {
// 'sleet', 60x54px
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xfc, 0x00, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xfc, 0x00, 0xbf, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xfc, 0x00, 0x3f, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xf8, 0x00, 0x0f, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xf0, 0x00, 0x07, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xf0, 0x00, 0x07, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xc0, 0x00, 0x07, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xc0, 0x00, 0x07, 0xff, 0xff, 0xf0,
0xff, 0xff, 0x80, 0x00, 0x07, 0xff, 0xff, 0xf0, 0xff, 0xfc, 0x00, 0x00, 0x07, 0xff, 0xff, 0xf0,
0xff, 0xf8, 0x00, 0x00, 0x07, 0xff, 0xff, 0xf0, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xf0,
0xff, 0xd0, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf0,
0xff, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf0,
0xff, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0,
0xff, 0x00, 0x70, 0x00, 0x00, 0x03, 0xff, 0xf0, 0xff, 0x00, 0x70, 0x00, 0x00, 0x03, 0xff, 0xf0,
0xff, 0x03, 0xfc, 0x00, 0x00, 0x03, 0xff, 0xf0, 0xff, 0x47, 0x0c, 0x00, 0x00, 0x0f, 0xff, 0xf0,
0xff, 0xc4, 0x04, 0x00, 0x00, 0x0f, 0xff, 0xf0, 0xff, 0xf4, 0x0c, 0x00, 0x00, 0x0f, 0xff, 0xf0,
0xff, 0xf4, 0x7c, 0x40, 0x00, 0x0f, 0xff, 0xf0, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0x9f, 0xff, 0xf0,
0xff, 0xfc, 0x00, 0x00, 0x00, 0xdf, 0xff, 0xf0, 0xff, 0xfc, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0,
0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xfe, 0x1f, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0
};
const unsigned char snow [] PROGMEM = {
// 'snow(1)', 57x58px
0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0x80,
0xff, 0xff, 0xff, 0xe0, 0x7f, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0xff, 0xff, 0x80,
0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xff, 0x80,
0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xb0, 0xff, 0xff, 0xff, 0x80,
0xff, 0xe0, 0xff, 0x00, 0x07, 0xf0, 0x7f, 0x80, 0xff, 0xc0, 0xf3, 0x00, 0x0f, 0xf0, 0x7f, 0x80,
0xff, 0xc0, 0xf3, 0x00, 0x0c, 0xf0, 0x3f, 0x80, 0xff, 0xc0, 0xe3, 0xc0, 0x1c, 0xf0, 0x3f, 0x80,
0xff, 0xe0, 0x03, 0xe0, 0x3c, 0x60, 0x3f, 0x80, 0xff, 0xf0, 0x03, 0xf0, 0x7c, 0x00, 0x3f, 0x80,
0xff, 0xfe, 0x03, 0xf0, 0xfc, 0x03, 0xff, 0x80, 0xff, 0xff, 0x03, 0xf0, 0xfc, 0x07, 0xff, 0x80,
0xff, 0xfe, 0x01, 0xf0, 0xfc, 0x07, 0xff, 0x80, 0xff, 0xfc, 0x00, 0xf0, 0xfc, 0x03, 0xff, 0x80,
0xff, 0xf0, 0x00, 0xf0, 0xf8, 0x00, 0xff, 0x80, 0xff, 0xf0, 0x00, 0x70, 0xf0, 0x00, 0xff, 0x80,
0xff, 0xff, 0xf0, 0x30, 0xe0, 0x1f, 0xff, 0x80, 0xff, 0xef, 0xf8, 0x10, 0xe0, 0xff, 0xff, 0x80,
0xff, 0xc3, 0xec, 0x00, 0x01, 0xfe, 0x7f, 0x80, 0xff, 0xe3, 0xfe, 0x00, 0x03, 0xfc, 0x7f, 0x80,
0xff, 0xe1, 0xff, 0x00, 0x03, 0xfc, 0x7d, 0x80, 0xf8, 0xe0, 0x7f, 0x00, 0x07, 0xf0, 0xff, 0x80,
0xf0, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0xf0, 0x80, 0xf0, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x60, 0x80,
0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0xf0, 0xe0, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xe1, 0xfe, 0x00, 0x00, 0x00, 0x21, 0x80,
0xff, 0xe3, 0xfc, 0x00, 0x0f, 0xf0, 0x77, 0x80, 0xff, 0xc3, 0xfc, 0x00, 0x0f, 0xf8, 0x7f, 0x80,
0xff, 0xe7, 0xf8, 0x00, 0x07, 0xfc, 0x7f, 0x80, 0xff, 0xff, 0xf0, 0x30, 0x03, 0xfc, 0x7f, 0x80,
0xff, 0xff, 0xf0, 0x70, 0xc3, 0xff, 0x7f, 0x80, 0xff, 0xf1, 0x80, 0xf0, 0xc1, 0xff, 0xff, 0x80,
0xff, 0xf0, 0x01, 0xf0, 0xc0, 0x00, 0xff, 0x80, 0xff, 0xf0, 0x03, 0xe0, 0xe0, 0x01, 0xff, 0x80,
0xff, 0xfe, 0x07, 0xe0, 0xf0, 0x03, 0xff, 0x80, 0xff, 0xfc, 0x07, 0xe0, 0xf8, 0x07, 0xff, 0x80,
0xff, 0xfc, 0x07, 0xf0, 0xfc, 0x0f, 0xff, 0x80, 0xff, 0xf8, 0x03, 0xe0, 0x7c, 0x0f, 0xff, 0x80,
0xff, 0xe0, 0x43, 0xe0, 0xfc, 0x00, 0xff, 0x80, 0xff, 0xc0, 0xe3, 0xc0, 0xfc, 0x40, 0x3f, 0x80,
0xff, 0xc0, 0xe3, 0x00, 0x3c, 0x60, 0x7f, 0x80, 0xff, 0xc0, 0xf6, 0x00, 0x1c, 0xf0, 0x3f, 0x80,
0xff, 0xe0, 0xfc, 0x21, 0x0d, 0xe0, 0x7f, 0x80, 0xff, 0xe0, 0xfc, 0x33, 0xcf, 0xf0, 0xff, 0x80,
0xff, 0xff, 0xfb, 0xf3, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xe1, 0xfd, 0xff, 0xff, 0x80,
0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0x80,
0xff, 0xff, 0xff, 0xc0, 0x7f, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0x80,
0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0x80
};
const unsigned char thunderstrom_drizzle [] PROGMEM = {
// 'thunderstorm with drizzle', 59x55px
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xf0, 0x3f, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0x80, 0x07, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xfc, 0x00, 0x01, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xf0, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x3f, 0xff, 0xe0,
0xff, 0xff, 0xe0, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x3f, 0xff, 0xe0,
0xff, 0xff, 0x80, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0,
0xff, 0xf8, 0x00, 0x00, 0x00, 0x03, 0xff, 0xe0, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0,
0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0,
0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0,
0xff, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x07, 0xe0, 0xff, 0x80, 0x00, 0x00, 0x3f, 0xf0, 0x07, 0xe0,
0xff, 0x80, 0x00, 0x00, 0x3f, 0xf0, 0x07, 0xe0, 0xff, 0x80, 0x00, 0x00, 0x30, 0x30, 0x07, 0xe0,
0xff, 0x80, 0x00, 0x00, 0x60, 0x30, 0x07, 0xe0, 0xff, 0x80, 0x01, 0xf8, 0x60, 0x60, 0x07, 0xe0,
0xff, 0x80, 0x07, 0xfe, 0x60, 0x60, 0x07, 0xe0, 0xff, 0xc0, 0x0c, 0x06, 0xc0, 0xe0, 0x07, 0xe0,
0xff, 0xc0, 0x0c, 0x07, 0xc0, 0xf8, 0x07, 0xe0, 0xff, 0xc0, 0x18, 0x07, 0xc1, 0xfc, 0x0f, 0xe0,
0xff, 0xe0, 0x18, 0x07, 0x80, 0x0c, 0x0f, 0xe0, 0xff, 0xf0, 0x30, 0x0f, 0x80, 0x0c, 0x1f, 0xe0,
0xff, 0xf8, 0x30, 0x1f, 0x80, 0x1c, 0x3f, 0xe0, 0xff, 0xfc, 0x30, 0x1f, 0x80, 0x38, 0x7f, 0xe0,
0xff, 0xff, 0xe0, 0x1f, 0xf8, 0x31, 0xff, 0xe0, 0xff, 0xff, 0xe0, 0x3f, 0xf8, 0x7f, 0xff, 0xe0,
0xff, 0xff, 0xc0, 0x00, 0xf1, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xc0, 0x03, 0xef, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xfe, 0x07, 0xef, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xfe, 0x0f, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xfe, 0x1f, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xfe, 0x1f, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xe0
};
const unsigned char unknown_prep [] PROGMEM = {
// 'unknown prep', 59x54px
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xfe, 0x00, 0x03, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xf8, 0x00, 0x01, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xf0, 0x00, 0x00, 0x7f, 0xff, 0xe0, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xff, 0xe0,
0xff, 0xff, 0xe0, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x3f, 0xff, 0xe0,
0xff, 0xff, 0xc0, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x3f, 0xff, 0xe0,
0xff, 0xff, 0xc0, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xe0,
0xff, 0xf8, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xe0, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0,
0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0,
0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0,
0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0,
0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0,
0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0,
0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0xff, 0xff, 0x80, 0x00, 0x00, 0x0f, 0xff, 0xe0,
0xff, 0xff, 0x80, 0x00, 0x00, 0x0f, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xf1, 0xfc, 0x7f, 0x1f, 0xff, 0xe0,
0xff, 0xff, 0xe1, 0xf8, 0x7e, 0x1f, 0xff, 0xe0, 0xff, 0xff, 0xe3, 0xf8, 0x7e, 0x1f, 0xff, 0xe0,
0xff, 0xff, 0xc7, 0xf0, 0xfc, 0x3f, 0xff, 0xe0, 0xff, 0xff, 0x87, 0xe1, 0xf8, 0x7f, 0xff, 0xe0,
0xff, 0xff, 0x8f, 0xe3, 0xf0, 0xff, 0xff, 0xe0, 0xff, 0xff, 0x0f, 0xc3, 0xf0, 0xff, 0xff, 0xe0,
0xff, 0xff, 0x1f, 0xc7, 0xf1, 0xff, 0xff, 0xe0, 0xff, 0xff, 0x1f, 0xc7, 0xf1, 0xff, 0xff, 0xe0,
0xff, 0xff, 0x3f, 0xcf, 0xf3, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0
};
String api_key = " Enter API key"; // Enter your API key
const char* ssid = "Enter SSID"; // Enter your SSID
const char* pass = "Enter Password"; // Enter Password
String api_head = "http://api.weatherbit.io/v2.0/current?city=";
Adafruit_SSD1306 display(128, 64, &Wire, -1);
void setup() {
// Displays all the weather icons
Serial.begin(115200);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
delay(300);
display.clearDisplay();
display.drawBitmap(0, 0, thunderstorm_rain, 57, 56, BLACK, WHITE);
display.display();
delay(300);
display.clearDisplay();
display.drawBitmap(0, 0, thunderstrom_drizzle, 57, 56, BLACK, WHITE);
display.display();
delay(300);
display.clearDisplay();
display.drawBitmap(0, 0, drizzle, 57, 54, BLACK, WHITE);
display.display();
delay(300);
display.clearDisplay();
display.drawBitmap(0, 0, rain, 57, 54, BLACK, WHITE);
display.display();
delay(300);
display.clearDisplay();
display.drawBitmap(0, 0, snow, 57, 54, BLACK, WHITE);
display.display();
delay(300);
display.clearDisplay();
display.drawBitmap(0, 0, sleet, 57, 54, BLACK, WHITE);
display.display();
delay(300);
display.clearDisplay();
display.drawBitmap(0, 0, mist, 57, 54, BLACK, WHITE);
display.display();
delay(300);
display.clearDisplay();
display.drawBitmap(0, 0, cloudy, 57, 54, BLACK, WHITE);
display.display();
delay(300);
display.clearDisplay();
display.drawBitmap(0, 0, unknown_prep, 57, 54, BLACK, WHITE);
display.display();
delay(300);
display.clearDisplay();
display.fillCircle(30, 30, 20, WHITE);
display.display();
delay(500);
display.clearDisplay();
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.setTextSize(2);
display.println("OLED");
display.println("WEATHER");
display.println("MOTINORING");
display.display();
delay(1000);
display.invertDisplay(1);
delay(500);
// displays ssid of the router to be connected
display.invertDisplay(0);
display.clearDisplay();
display.setCursor(0, 0);
display.setTextColor(WHITE);
display.setTextSize(2);
display.println("CONNECTING");
display.setCursor(52, 16);
display.println("TO");
display.setTextSize(1);
display.println(ssid);
display.display();
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) // wait for connection
{
Serial.print(".");
delay(500);
}
display.setCursor(0, 48);
display.setTextSize(2);
display.setTextColor(BLACK, WHITE);
display.print("Connected");
display.display();
delay(500);
display.clearDisplay();
display.setTextColor(WHITE);
}
String payload;
void loop() {
HTTPClient http;
String main_head = "";
main_head = api_head + "GOA";
main_head = main_head + "&country=IN&units=M&key=";
main_head = main_head + api_key;
http.begin(main_head);
int httpcode = http.GET();
display.clearDisplay();
if (httpcode != 200) // Not an OK response
{
display.setTextSize(1);
display.setCursor(0, 32);
display.println("Please Wait.....");
display.println("");
display.print("Is internet available??");
display.display();
Serial.println(main_head);
delay(1000);
return;
}
// Success response
else
{
// payload=http.getString();
// Serial.println(payload);
// Parsing
const size_t buffersize = JSON_ARRAY_SIZE(1) + JSON_OBJECT_SIZE(2) + JSON_OBJECT_SIZE(3) + JSON_OBJECT_SIZE(36);
DynamicJsonBuffer jsonBuffer(buffersize);
JsonObject& root = jsonBuffer.parseObject(http.getString());
JsonObject& current_obs = root["data"][0];
JsonObject& current_desc = current_obs["weather"];
const char* city_name = current_obs["city_name"];
float curr_temp = current_obs["temp"];
int air_quality = current_obs["aqi"];
float app_temp = current_obs["app_temp"];
float wind_spd = current_obs["wind_spd"];
const char* wind_cdir = current_obs["wind_cdir"];
const char* sunrise = current_obs["sunrise"];
const char* sunset = current_obs["sunset"];
const char* desc = current_desc["description"];
int code = current_desc["code"];
displaywidget(code);
/* For verification on Serial Monitor
Serial.print(city_name);
Serial.print("\t");
Serial.print(air_quality);
Serial.print("\t");
Serial.print(app_temp);
Serial.print("\t");
Serial.print(wind_spd);
Serial.print("/");
Serial.print(wind_cdir);
Serial.print("\t");
Serial.print(desc);
Serial.println(code);
*/
// Details displayed on the OLED
display.setCursor(62, 0);
display.setTextSize(2);
display.println("GOA");
display.setTextSize(1);
display.setCursor(62, 20);
display.print(city_name); // Prints city name ie: Marmagao in my case
display.drawLine(62, 28, 127, 28, WHITE);
display.setCursor(62, 32);
display.setTextSize(2);
display.print(curr_temp);
display.setTextSize(1);
display.setCursor(62, 48);
display.print(wind_spd);
display.print("m/s ");
display.println(wind_cdir);
display.setCursor(0, 56);
display.print(desc);
display.print("\t");
display.print("");
display.startscrollleft(0x07, 0x07);
display.display();
delay(10000);
display.stopscroll();
}
http.end();
}
// Allocating the Weather icon based on their respective icon code
void displaywidget(int code_no)
{
if (200 <= code_no and code_no <= 202)
display.drawBitmap(0, 0, thunderstorm_rain, 57, 56, BLACK, WHITE);
else if (230 <= code_no and code_no <= 233)
display.drawBitmap(0, 0, thunderstrom_drizzle, 57, 56, BLACK, WHITE);
else if (300 <= code_no and code_no <= 302)
display.drawBitmap(0, 0, drizzle, 57, 54, BLACK, WHITE);
else if (500 <= code_no and code_no <= 522)
display.drawBitmap(0, 0, rain, 57, 54, BLACK, WHITE);
else if ((600 <= code_no and code_no <= 610) or(621 <= code_no and code_no <= 623))
display.drawBitmap(0, 0, snow, 57, 54, BLACK, WHITE);
else if (611<= code_no and code_no <= 612)
display.drawBitmap(0, 0, sleet, 57, 54, BLACK, WHITE);
else if (700 <= code_no and code_no <= 751)
display.drawBitmap(0, 0, mist, 57, 54, BLACK, WHITE);
else if (801 <= code_no and code_no <= 804)
display.drawBitmap(0, 0, cloudy, 57, 54, BLACK, WHITE);
else if (code_no == 900)
display.drawBitmap(0, 0, unknown_prep, 57, 54, BLACK, WHITE);
else
display.fillCircle(30, 30, 20, WHITE); // sunny day
}
Comments