Rob KabelCraig Biryla
Published © MIT

Photon Weather Display

Particle project using two Photons to connect to Weather Underground and display relevant weather information.

BeginnerFull instructions provided2 hours2,776
Photon Weather Display

Things used in this project

Hardware components

Photon
Particle Photon
×2
Particle SERIAL OLED SCREEN,0.96"
×2
Breadboard (generic)
Breadboard (generic)
×2
Micro-USB to USB Cable (Generic)
Micro-USB to USB Cable (Generic)
×2

Software apps and online services

ThingSpeak API
ThingSpeak API
SmartThings service
IFTTT SmartThings service

Story

Read more

Schematics

Photon + Display Schematic

The wiring schematic for the Photon and display, both photons utilized the same wiring configuration,

Code

Main Photon

C/C++
Main code that draws the information from Weather Underground, parses the data and sends to second photon as an integer.
#include "ThingSpeak.h"

TCPClient client;

/*********************************************************************
This is an example for our Monochrome OLEDs based on SSD1306 drivers
  Pick one up today in the adafruit shop!
  ------> http://www.adafruit.com/category/63_98
This example is for a 128x64 size display using SPI to communicate
4 or 5 pins are required to interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada  for Adafruit Industries.
BSD license, check license.txt for more information
All text above, and the splash screen must be included in any redistribution
*********************************************************************/

#include "Adafruit_GFX.h"
#include "Adafruit_SSD1306.h"

// use hardware SPI
#define OLED_DC     D3
#define OLED_CS     D4
#define OLED_RESET  D5
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);

#define LOGO16_GLCD_HEIGHT 32
#define LOGO16_GLCD_WIDTH  16

String hightemp, lowtemp, month, day, year, hour, minute, period, date, date_time, current_time, midday;
int changed_hour, current_hour, current_minute;

const String myWriteAPIKey = "YourWriteAPIKeyHere";

unsigned long myChannelNumber = YourAPIKeyHere;

float field_1; //high temp
float field_2; //low temp
float field_3; //avg temp
int field_4; //moon phase
float field_5; //moon rise format - hour.minute
float field_6; //moon set format - hour.minute
float field_7; //sunrise format - hour.minute
float field_8; //sunset format - hour.minute

float avg_temp; //takes the high - low / 2 for the average

int ageofmoon;

float sunrise, sunset, moonrise, moonset, hightemp_float, lowtemp_float;

String todays_weather, conditions;

float now_temp;
String cond_weather_icon, cond_weather_icon_url, cond_weather_forecast_url, cond_weather_history_url, cond_weather;

int boardLed = D7;

void setup()   {
  Serial.begin(9600); // for the oled serial screen

  pinMode(boardLed,OUTPUT);

  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC);

  ThingSpeak.begin(client);

 Particle.subscribe("hook-response/get_temp_weather", temp, MY_DEVICES);
 Particle.subscribe("hook-response/get_conditions_weather", conditions_weather, MY_DEVICES);
 Particle.subscribe("hook-response/get_astronomy_time", astronomy_weather, MY_DEVICES);

 display.clearDisplay(); //clears the buffer oled splashscreen

 static const unsigned char startup_display[] =
 {
    0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x0c, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
    0x00, 0x00, 0xc0, 0xe0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x40, 0x00,
    0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0d, 0x01, 0xc0, 0x00,
    0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x03, 0x80, 0x00,
    0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x12, 0x18, 0x86, 0x00, 0x00,
    0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0c, 0x00, 0x00,
    0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x18, 0x58, 0x00, 0x00,
    0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x38, 0x00, 0x00,
    0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xff, 0xfe, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x20, 0x0f, 0xff, 0xfe, 0x03, 0xe0,
    0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f, 0xff, 0xff, 0x9f, 0xc0,
    0x00, 0x40, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x9f, 0xff, 0xff, 0xfd, 0x80,
    0x00, 0x40, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1f, 0xfd, 0xff, 0xe1, 0x00,
    0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0e, 0x3f, 0xf0, 0x3f, 0xe2, 0x00,
    0x00, 0x7c, 0x80, 0x02, 0xfc, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x3f, 0xe0, 0x3f, 0xe2, 0x00,
    0x01, 0x81, 0x00, 0x03, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x1f, 0xf0, 0x00,
    0x03, 0x00, 0x00, 0x00, 0x01, 0x0f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x1f, 0xf8, 0x00,
    0x06, 0x00, 0x00, 0x00, 0x00, 0x90, 0x30, 0x00, 0x80, 0x00, 0x00, 0xff, 0xe0, 0x1f, 0xf8, 0x00,
    0x04, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf0, 0x3f, 0xff, 0x80,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x04, 0xff, 0xf8, 0xff, 0xff, 0xf0,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x30, 0xff, 0xff, 0xff, 0xf8, 0x38,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0xfc, 0x00, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xf8, 0x3a,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x03, 0x00, 0x00, 0x70, 0xff, 0xff, 0xff, 0xf8, 0x80,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0xc0, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x00,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf8, 0x00,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf8, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x20, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfc, 0x00,
    0x20, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x20, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xf6, 0x00,
    0x40, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xe3, 0x00,
    0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xe1, 0x80,
    0xc0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x04, 0x1f, 0xff, 0xff, 0xe1, 0xc0,
    0xc0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x0f, 0xef, 0xff, 0xff, 0x9e, 0xc0,
    0x40, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x30, 0x00, 0x1f, 0x87, 0xff, 0xff, 0x80, 0x20,
    0x40, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0xff, 0xfe, 0x80, 0x00,
    0x40, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xff, 0xf8, 0xc0, 0x00,
    0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0xc0, 0xd0, 0xc0, 0x00,
    0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, 0xc0, 0xc8, 0x60, 0x00,
    0x18, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x80, 0xc2, 0x60, 0x00,
    0x01, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x08, 0xc1, 0xe0, 0x00,
    0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0e, 0x05, 0x80, 0x60, 0x00,
    0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x18, 0x03, 0x80, 0x20, 0x00,
    0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x20, 0x03, 0x80, 0x20, 0x00,
    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x41, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x41, 0x04, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0xc3, 0x10, 0x80, 0x00, 0x00, 0x40, 0x00,
    0x00, 0x22, 0x88, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x81, 0x10, 0x40, 0x00, 0x00, 0x40, 0x00,
    0x00, 0x22, 0x88, 0x70, 0x3c, 0x7d, 0x78, 0x38, 0x5d, 0x00, 0x90, 0x45, 0xe0, 0xf0, 0xf8, 0x00,
    0x00, 0x22, 0x88, 0x88, 0x42, 0x21, 0x84, 0x44, 0x61, 0x00, 0x90, 0x46, 0x11, 0x08, 0x40, 0x00,
    0x00, 0x12, 0x91, 0x04, 0x02, 0x21, 0x04, 0x82, 0x41, 0x00, 0x90, 0x84, 0x12, 0x04, 0x40, 0x00,
    0x00, 0x14, 0x51, 0xfc, 0x7e, 0x21, 0x04, 0xfe, 0x41, 0x00, 0x9f, 0x04, 0x12, 0x04, 0x40, 0x00,
    0x00, 0x14, 0x51, 0x00, 0x82, 0x21, 0x04, 0x80, 0x41, 0x00, 0x90, 0x84, 0x12, 0x04, 0x40, 0x00,
    0x00, 0x14, 0x51, 0x00, 0x82, 0x21, 0x04, 0x80, 0x40, 0x81, 0x10, 0x44, 0x12, 0x04, 0x40, 0x00,
    0x00, 0x08, 0x20, 0x84, 0x86, 0x21, 0x04, 0x42, 0x40, 0xc3, 0x10, 0x24, 0x11, 0x08, 0x40, 0x00,
    0x00, 0x08, 0x20, 0x78, 0x7a, 0x1d, 0x04, 0x3c, 0x40, 0x3c, 0x10, 0x14, 0x10, 0xf0, 0x38, 0x00,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
 };

  display.drawBitmap(0,0,startup_display,128,64,1);
  display.display();
  delay(2000);

}

void loop() {

  String data = String(10); //gives the value a buffer to work properly

  Particle.publish("get_conditions_weather", data);
  delay(10000);
  Time.zone(-5.00);
  current_time = Time.format(Time.now(), "%I:%M %p");
  delay(10000);

  Particle.publish("get_temp_weather", data);

  delay(10000);

  todays_weather = ("Current Weather, T:" + current_time + ", D: " + date + ", High T: " + hightemp + ", Low T: " + lowtemp + ", Current T: " + String(now_temp, 1) + ", Cond: " + cond_weather + " " + cond_weather_icon_url);
  Particle.publish("sendsomeweatherinfo", todays_weather, PUBLIC);

  send_to_other_photon();

  Particle.publish("send_weather_info", todays_weather);

  delay(10000);

  Particle.publish("get_astronomy_time", data);

  delay(5000);
  writetothingspeak();
  delay(5000);

  todays_astronomy = ("field_1: " + String(field_1, 1) + ", field_2: " + String(field_2, 1) + ", field_3: " + String(field_3, 1) + ", field_4: " + String(field_4) + ", field_5: " + String(field_5, 2) + ", field_6: " + String(field_6, 2) + ", field_7: " + String(field_7, 2) + ", field_8: " + String(field_8, 2));

  Particle.publish("send_astronomy_data", todays_astronomy, PUBLIC);

  delay(60000 * 60 * 24); //24 hours

}

void writetothingspeak(void)
{
  field_1 = hightemp_float;
  field_2 = lowtemp_float;
  field_3 = (hightemp_float - lowtemp_float) / 2 ;
  field_4 = ageofmoon;
  field_5 = moonrise;
  field_6 = moonset;
  field_7 = sunrise;
  field_8 = sunset;

  ThingSpeak.writeField(myChannelNumber, 1, field_1, myWriteAPIKey);

  delay(30000);
  ThingSpeak.writeField(myChannelNumber, 2, field_2, myWriteAPIKey);

  delay(30000);
  ThingSpeak.writeField(myChannelNumber, 3, field_3, myWriteAPIKey);

  delay(30000);
  ThingSpeak.writeField(myChannelNumber, 4, field_4, myWriteAPIKey);

  delay(30000);
  ThingSpeak.writeField(myChannelNumber, 5, field_5, myWriteAPIKey);

  delay(30000);
  ThingSpeak.writeField(myChannelNumber, 6, field_6, myWriteAPIKey);

  delay(30000);
  ThingSpeak.writeField(myChannelNumber, 7, field_7, myWriteAPIKey);

  delay(30000);
  ThingSpeak.writeField(myChannelNumber, 8, field_8, myWriteAPIKey);

  delay(5000);
}

void astronomy_weather(const char *event, const char *data) {

    int sunrise_hour, sunset_hour, moonrise_hour, moonset_hour = 0;
    float sunrise_minute, sunset_minute, moonrise_minute, moonset_minute = 0;

    String my_str2 = String(data);
    char my_str2Buffer[64] = "";
    my_str2.toCharArray(my_str2Buffer, 64);

    ageofmoon = atoi(strtok(my_str2Buffer, "\"~"));
    sunrise_hour = atoi(strtok(NULL, "~"));
    sunrise_minute = atoi(strtok(NULL, "~"));
    sunset_hour = atoi(strtok(NULL, "~"));
    sunset_minute = atoi(strtok(NULL, "~"));
    moonrise_hour = atoi(strtok(NULL, "~"));
    moonrise_minute = atoi(strtok(NULL, "~"));
    moonset_hour = atoi(strtok(NULL, "~"));
    moonset_minute = atoi(strtok(NULL, "~"));

    sunrise_minute = sunrise_minute * 0.01;
    sunset_minute = sunset_minute * 0.01;
    moonrise_minute = moonrise_minute * 0.01;
    moonset_minute = moonset_minute * 0.01;

    sunrise = sunrise_hour + sunrise_minute;
    sunset = sunset_hour + sunset_minute;
    moonrise = moonrise_hour + moonrise_minute;
    moonset = moonset_hour + moonset_minute;

    delay(1010);

}

void conditions_weather(const char *event, const char *data) {

    String my_str = String(data);
    char my_strBuffer[64] = "";
    my_str.toCharArray(my_strBuffer, 64);

    now_temp = atof(strtok(my_strBuffer, "\"~"));
    cond_weather = strtok(NULL, "~");
    cond_weather_icon = strtok(NULL, "~");
    cond_weather_icon_url = strtok(NULL, "~");
    cond_weather_forecast_url = strtok(NULL, "~");
    cond_weather_history_url = strtok(NULL, "~");

    delay(1010);
}

void temp(const char *event, const char *data) {

  String str = String(data);
  char strBuffer[64] = "";
  str.toCharArray(strBuffer, 64);

  date_time = strtok(strBuffer, "\"~"); //These all depend on how you setup your webhook
  date_time.remove(8, 4);
  date = strtok(NULL, "~");
  period = strtok(NULL, "~");
  hightemp = strtok(NULL, "~");
  lowtemp = strtok(NULL, "~");
  hightemp_float = atof(hightemp);
  lowtemp_float = atof(lowtemp);

  delay(1010);
  write_to_screen();

}

void write_to_screen(void)
  {

  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);

  display.setCursor(0,0);
  display.println("Date");
  display.setCursor(0,10);
  display.println(date);
  display.setCursor(0,20);
  display.println("");
  display.setCursor(0,30);

  display.println("Time");
  display.setCursor(0,40);
  display.println(current_time);
  display.display();

  display.setCursor(70,0);
  display.println("High Temp");
  display.setCursor(70,10);
  display.println(hightemp);
  display.setCursor(70,20);
  display.println("");
  display.setCursor(70,30);
  display.println("Low Temp");
  display.setCursor(70,40);
  display.println(lowtemp);
  display.display();

  digitalWrite(D7, LOW);
  delay(1010);
  }

void send_to_other_photon(void)
{

  int returnweather = 5;
  int i = 0;
  String cw = cond_weather;
  String rain[] = {"Heavy Drizzle", "Light Drizzle", "Light Rain", "Heavy Rain", "Light Rain Showers", "Light Thunderstorm", "Heavy Thunderstorm", "Light Thunderstorms and Rain", "Heavy Thunderstorms and Rain", ""}; //returnweather == 1
  String cloudy[] = {"Overcast", "Partial Fog", "Partial Cloudy", "Mostly Cloudy", "Shallow Fog", "Patches of Fog", ""}; //returnweather == 2
  String sunshine[] = {"Clear", "Scattered Clouds", ""};
  String snow[] = {"Light Snow Showers", "Heavy Snow Showers", "Light Ice Pellet Showers", "Heavy Ice Pellet Showers", ""}; //returnweather == 4;

  while (! rain[i].equals(String("")))
  {
    if (cw.equals(rain[i]))
    {
        returnweather = 1;
    }
    i++;
  }

  i = 0;
  while (! cloudy[i].equals(String("")))
  {
    if (cw.equals(cloudy[i]))
    {
        returnweather = 2;
    }
    i++;
  }

  i = 0;
  while (! sunshine[i].equals(String("")))
  {
    if (cw.equals(sunshine[i]))
    {
        returnweather = 3;
    }
    i++;
  }

  i = 0;
  while (! snow[i].equals(String("")))
  {
    if (cw.equals(snow[i]))
    {
        returnweather = 4;
    }
    i++;
  }

  if (returnweather == 1)
  {
    Particle.publish("sending_weather_photon_char", "rain");
    delay(1010);
    Particle.publish("sending_weather_photon_int", String(1));
  }

  else if (returnweather == 2)
  {
    Particle.publish("sending_weather_photon_char", "cloudy");
    delay(1010);
    Particle.publish("sending_weather_photon_int", String(2));
  }

  else if (returnweather == 3)
  {
    Particle.publish("sending_weather_photon_char", "sunshine");
    delay(1010);
    Particle.publish("sending_weather_photon_int", String(3));
  }

  else if (returnweather == 4)
  {
    Particle.publish("sending_weather_photon_char", "snow");
    delay(1010);
    Particle.publish("sending_weather_photon_int", String(4));
  }

  else if (returnweather == 5)
  {
    Particle.publish("sending_weather_photon_char", "error");
    delay(1010);
    Particle.publish("sending_weather_photon_int", String(5));
  }

}

Secondary Photon

C/C++
Secondary Photon that receives the integer from the Main Photon via the cloud and produces an image based on the current weather pulled from Weather Underground.
#include "Adafruit_SSD1306.h"
#include "Adafruit_GFX.h"

/*********************************************************************
This is an example for our Monochrome OLEDs based on SSD1306 drivers
  Pick one up today in the adafruit shop!
  ------> http://www.adafruit.com/category/63_98
This example is for a 128x64 size display using SPI to communicate
4 or 5 pins are required to interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada  for Adafruit Industries.
BSD license, check license.txt for more information
All text above, and the splash screen must be included in any redistribution
*********************************************************************/

// use hardware SPI
#define OLED_DC     D3
#define OLED_CS     D4
#define OLED_RESET  D5
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);

#define LOGO16_GLCD_HEIGHT 32
#define LOGO16_GLCD_WIDTH  16

int boardLed = D7;

static const unsigned char cloudy[] =
{
	// 'cloudy'
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x3c, 0x00, 0x00, 0x06, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x01, 0x80, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x01, 0x80, 0x3c, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x01, 0x80, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x01, 0x80, 0xe0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x0f, 0x03, 0x80, 0x00, 0x30, 0x1e, 0x0f, 0xf0, 0x00, 0x30, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x3f, 0xfc, 0x00, 0x18, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x1e, 0x00, 0x0c, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x07, 0x00, 0x0c, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x03, 0x80, 0x06, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x80, 0x06, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xff, 0xc2, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xff, 0xf3, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xe0, 0x7b, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1c, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00,
	0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0c, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00,
	0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00,
	0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00,
	0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00,
	0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
	0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,
	0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
	0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
	0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
	0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00,


};

static const unsigned char rain[] =
{
	// 'Rain_mono'
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x7f, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x01, 0xe0, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x03, 0xc1, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc3, 0x83, 0xc3, 0x83, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x87, 0x83, 0xc3, 0x83, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x87, 0x87, 0x87, 0x83, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x07, 0x87, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x1e, 0x0f, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x3e, 0x0e, 0x1e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x1e, 0x1e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x1c, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x18, 0x3c, 0x08, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x78, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0xf8, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xf0, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

	static const unsigned char snow[] =
	{
	// 'Snow_mono'
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf2, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x02, 0x80, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x03, 0x82, 0x83, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0b, 0xe2, 0x8f, 0xa0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x19, 0xfa, 0xbf, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x1c, 0x7e, 0xfc, 0x70, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x1c, 0x3e, 0xf0, 0x70, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x03, 0xfc, 0x1c, 0x0e, 0xe0, 0x70, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1c, 0x02, 0x80, 0x70, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x1c, 0x02, 0x80, 0x70, 0xec, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x9c, 0x0e, 0xe0, 0x73, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0xe7, 0xfc, 0x1e, 0xf0, 0x7f, 0xdf, 0x80, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x0f, 0xc1, 0xfc, 0xce, 0xe6, 0x7f, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0xec, 0xc6, 0xce, 0x6e, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x7f, 0xc2, 0x8f, 0xfc, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe2, 0x8f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe7, 0x62, 0x8d, 0xcf, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x87, 0xfa, 0xbf, 0xc7, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x07, 0xfe, 0xff, 0xc1, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x06, 0x1e, 0xf0, 0xc0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x07, 0x1e, 0xf1, 0xc0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x07, 0xfe, 0xff, 0xc1, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc7, 0xfa, 0xbf, 0x87, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe7, 0x62, 0x8d, 0xcf, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xc2, 0x8f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x7f, 0xc2, 0x8f, 0xfc, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0xec, 0xc6, 0xce, 0x6e, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x0f, 0xc3, 0xfc, 0xde, 0xe6, 0x7f, 0x87, 0xe0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x03, 0xf7, 0xfc, 0x1e, 0xf0, 0x7f, 0xdf, 0x80, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x9c, 0x0e, 0xa0, 0x73, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x1c, 0x02, 0x80, 0x70, 0xec, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xfc, 0x1c, 0x02, 0x80, 0x70, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x03, 0xfc, 0x1c, 0x0e, 0xe0, 0x70, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x1c, 0x3e, 0xf8, 0x70, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x1c, 0x7e, 0xfc, 0x70, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1d, 0xfa, 0xbf, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x03, 0xe2, 0x8f, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x03, 0x82, 0x83, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x02, 0x80, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe2, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

	static const unsigned char sunny[] =
	{
	// 'SunShineBMP3_mono'
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x80, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x1e, 0xc0, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x1e, 0xc0, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x1c, 0x61, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xfe, 0x1c, 0x63, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe7, 0x1c, 0x37, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x9c, 0x37, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0xf0, 0x5f, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x77, 0xff, 0xff, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x7f, 0xff, 0xff, 0xe8, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x7f, 0xff, 0xff, 0xfb, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xf1, 0xff, 0xfe, 0xff, 0xff, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xff, 0xf8, 0x1f, 0xff, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xf0, 0x1f, 0xff, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xf0, 0x0f, 0xff, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xe0, 0x0f, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xe0, 0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0x1f, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xe7, 0xff, 0xfc, 0x7f, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0x87, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xf8, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x7f, 0x07, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xfc, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x3f, 0x87, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xfe, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xff, 0xff, 0xff, 0xff, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0xff, 0xff, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 0xff, 0xff, 0xff, 0xfe, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x3f, 0xff, 0xff, 0xfc, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x27, 0xff, 0xff, 0xdc, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xff, 0xff, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0xff, 0xfe, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0xf8, 0x73, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0xd8, 0x71, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x8c, 0x70, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x0c, 0x70, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x06, 0xf0, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x07, 0xf0, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0xe0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x03, 0xe0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

    static const unsigned char errorpic[] =
    {

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0x08, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00,
0x00, 0x00, 0x30, 0x38, 0x00, 0x00, 0x80, 0x00, 0x07, 0x00, 0x01, 0x00, 0xd0, 0x1c, 0x00, 0x00,
0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x07, 0x00, 0x01, 0x81, 0x80, 0x38, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0f, 0x00, 0x01, 0x21, 0x88, 0x60, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0f, 0x80, 0x01, 0x01, 0x80, 0xc0, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x01, 0x01, 0x85, 0x80, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x01, 0x8e, 0x03, 0x80, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x01, 0x9f, 0xff, 0xe0, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x01, 0x00, 0xff, 0xff, 0xf9, 0xfc, 0x00,
0x00, 0x10, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x01, 0xf9, 0xff, 0xff, 0xff, 0xd8, 0x00,
0x00, 0x10, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x01, 0xc1, 0xff, 0xdf, 0xfe, 0x10, 0x00,
0x00, 0x10, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xe3, 0xff, 0x03, 0xfe, 0x20, 0x00,
0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x73, 0xfe, 0x03, 0xfe, 0x20, 0x00,
0x00, 0x1f, 0xa0, 0x00, 0xbf, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x3f, 0xfe, 0x01, 0xff, 0x00, 0x00,
0x00, 0x60, 0xc0, 0x00, 0xc0, 0x80, 0x00, 0x01, 0xf8, 0x00, 0x0f, 0xfe, 0x01, 0xff, 0x80, 0x00,
0x00, 0xc0, 0x00, 0x00, 0x00, 0x43, 0xf8, 0x01, 0xf0, 0x00, 0x0f, 0xfe, 0x01, 0xff, 0x80, 0x00,
0x01, 0x80, 0x00, 0x00, 0x00, 0x24, 0x0c, 0x03, 0xe0, 0x00, 0x1f, 0xff, 0x03, 0xff, 0xf8, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0xc0, 0x00, 0xcf, 0xff, 0x8f, 0xff, 0xff, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0x80, 0x03, 0x0f, 0xff, 0xff, 0xff, 0x83, 0x80,
0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x07, 0x80, 0x1f, 0x0f, 0xff, 0xff, 0xff, 0x83, 0xa0,
0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x07, 0x00, 0x07, 0x0f, 0xff, 0xff, 0xff, 0x8c, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0f, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0x80, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x1e, 0x00, 0x00, 0x0f, 0x3f, 0xff, 0xff, 0x80, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x00, 0x0e, 0x3f, 0xff, 0xff, 0xc0, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x1e, 0x00, 0x00, 0x06, 0x3f, 0xff, 0xff, 0x70, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x3e, 0x00, 0x00, 0x22, 0x3f, 0xff, 0xfe, 0x30, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfe, 0x18, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x7e, 0x00, 0x00, 0x41, 0xff, 0xff, 0xfe, 0x1c, 0x00,
0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x7e, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf9, 0xfc, 0x00,
0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x7e, 0x00, 0x01, 0xf8, 0x7f, 0xff, 0xf8, 0x02, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe8, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x8c, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x8d, 0x8d, 0x0c, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x9c, 0x0c, 0x86, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0xb8, 0x0c, 0x26, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x8c, 0x1e, 0x00, 0x00,
0x00, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x58, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x01, 0x80, 0x38, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x02, 0x00, 0x38, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x40, 0x00, 0x10, 0x04, 0x00, 0x00, 0xf8, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x40, 0x00, 0x10, 0x04, 0x00, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x41, 0x00, 0x90, 0x04, 0x00, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0xfc, 0x02, 0x21, 0x04, 0x7e, 0x40, 0x00, 0x1e, 0x04, 0x10, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x21, 0x04, 0x00, 0x40, 0x00, 0x10, 0x04, 0x10, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x04, 0x00, 0x40, 0x00, 0x10, 0x04, 0x10, 0x00, 0x00, 0x00,
0x00, 0x08, 0x20, 0x00, 0x02, 0x01, 0x04, 0x00, 0x40, 0x00, 0x10, 0x04, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x04, 0x00, 0x40, 0x00, 0x10, 0x04, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    };

    static const unsigned char weatherornotpic[] =
    {

    0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x0c, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
    0x00, 0x00, 0xc0, 0xe0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x40, 0x00,
    0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0d, 0x01, 0xc0, 0x00,
    0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x03, 0x80, 0x00,
    0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x12, 0x18, 0x86, 0x00, 0x00,
    0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0c, 0x00, 0x00,
    0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x18, 0x58, 0x00, 0x00,
    0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0xe0, 0x38, 0x00, 0x00,
    0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0xff, 0xfe, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x20, 0x0f, 0xff, 0xfe, 0x03, 0xe0,
    0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f, 0xff, 0xff, 0x9f, 0xc0,
    0x00, 0x40, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x9f, 0xff, 0xff, 0xfd, 0x80,
    0x00, 0x40, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1f, 0xfd, 0xff, 0xe1, 0x00,
    0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0e, 0x3f, 0xf0, 0x3f, 0xe2, 0x00,
    0x00, 0x7c, 0x80, 0x02, 0xfc, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x3f, 0xe0, 0x3f, 0xe2, 0x00,
    0x01, 0x81, 0x00, 0x03, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x1f, 0xf0, 0x00,
    0x03, 0x00, 0x00, 0x00, 0x01, 0x0f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x1f, 0xf8, 0x00,
    0x06, 0x00, 0x00, 0x00, 0x00, 0x90, 0x30, 0x00, 0x80, 0x00, 0x00, 0xff, 0xe0, 0x1f, 0xf8, 0x00,
    0x04, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf0, 0x3f, 0xff, 0x80,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x04, 0xff, 0xf8, 0xff, 0xff, 0xf0,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x30, 0xff, 0xff, 0xff, 0xf8, 0x38,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0xfc, 0x00, 0x01, 0xf0, 0xff, 0xff, 0xff, 0xf8, 0x3a,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x03, 0x00, 0x00, 0x70, 0xff, 0xff, 0xff, 0xf8, 0x80,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0xc0, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x00,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf8, 0x00,
    0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf8, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x20, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfc, 0x00,
    0x20, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x20, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xf6, 0x00,
    0x40, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xe3, 0x00,
    0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xe1, 0x80,
    0xc0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x04, 0x1f, 0xff, 0xff, 0xe1, 0xc0,
    0xc0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x0f, 0xef, 0xff, 0xff, 0x9e, 0xc0,
    0x40, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x30, 0x00, 0x1f, 0x87, 0xff, 0xff, 0x80, 0x20,
    0x40, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x03, 0xff, 0xfe, 0x80, 0x00,
    0x40, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xff, 0xf8, 0xc0, 0x00,
    0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0xc0, 0xd0, 0xc0, 0x00,
    0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, 0xc0, 0xc8, 0x60, 0x00,
    0x18, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x80, 0xc2, 0x60, 0x00,
    0x01, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x08, 0xc1, 0xe0, 0x00,
    0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0e, 0x05, 0x80, 0x60, 0x00,
    0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x18, 0x03, 0x80, 0x20, 0x00,
    0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x20, 0x03, 0x80, 0x20, 0x00,
    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x41, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x41, 0x04, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0xc3, 0x10, 0x80, 0x00, 0x00, 0x40, 0x00,
    0x00, 0x22, 0x88, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x81, 0x10, 0x40, 0x00, 0x00, 0x40, 0x00,
    0x00, 0x22, 0x88, 0x70, 0x3c, 0x7d, 0x78, 0x38, 0x5d, 0x00, 0x90, 0x45, 0xe0, 0xf0, 0xf8, 0x00,
    0x00, 0x22, 0x88, 0x88, 0x42, 0x21, 0x84, 0x44, 0x61, 0x00, 0x90, 0x46, 0x11, 0x08, 0x40, 0x00,
    0x00, 0x12, 0x91, 0x04, 0x02, 0x21, 0x04, 0x82, 0x41, 0x00, 0x90, 0x84, 0x12, 0x04, 0x40, 0x00,
    0x00, 0x14, 0x51, 0xfc, 0x7e, 0x21, 0x04, 0xfe, 0x41, 0x00, 0x9f, 0x04, 0x12, 0x04, 0x40, 0x00,
    0x00, 0x14, 0x51, 0x00, 0x82, 0x21, 0x04, 0x80, 0x41, 0x00, 0x90, 0x84, 0x12, 0x04, 0x40, 0x00,
    0x00, 0x14, 0x51, 0x00, 0x82, 0x21, 0x04, 0x80, 0x40, 0x81, 0x10, 0x44, 0x12, 0x04, 0x40, 0x00,
    0x00, 0x08, 0x20, 0x84, 0x86, 0x21, 0x04, 0x42, 0x40, 0xc3, 0x10, 0x24, 0x11, 0x08, 0x40, 0x00,
    0x00, 0x08, 0x20, 0x78, 0x7a, 0x1d, 0x04, 0x3c, 0x40, 0x3c, 0x10, 0x14, 0x10, 0xf0, 0x38, 0x00,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
    };

#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

void setup()   {
  Serial.begin(9600);

  pinMode(boardLed,OUTPUT);

  display.begin(SSD1306_SWITCHCAPVCC);

  display.clearDisplay();   // clears the screen and buffer
  myHandler("data","10");
  Particle.subscribe("sending_weather_photon_int", myHandler);
}

//Handler takes info from Main photon and calls the correct image to be displayed
void myHandler (const char *event, const char *data){
     digitalWrite(D7,HIGH);
    if (strcmp ("1", data) == 0)
            rainyday();
    if (strcmp ("2", data) == 0)
            cloudyday();
    if (strcmp ("3", data) == 0)
            sunnyday();
    if (strcmp ("4", data) == 0)
            snowyday();
    if (strcmp ("5", data) == 0)
            error();
    if (strcmp ("10", data) == 0)
          weatherornot();
}

void loop() {

  String data = String(10); //buffer initial data
  }

void sunnyday(void)
{
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.println("Sunny");
  display.drawBitmap(0, 0, sunny, 128, 64, 1);
  display.display();
  delay(2000);
}

void cloudyday(void)
{
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.println("Cloudy");
  display.drawBitmap(0, 0, cloudy, 128, 64, 1);
  display.display();
  delay(2000);
}

void snowyday(void)
{
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.println("Snowy");
  display.drawBitmap(0, 0,  snow, 128, 64, 1);
  display.display();
  delay(2000);
}

void rainyday(void)
{
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.println("Rainy");
  display.drawBitmap(0, 0,  rain, 128, 64, 1);
  display.display();
  delay(2000);
}

void error(void)
{
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.drawBitmap(0, 0,  errorpic, 128, 64, 1);
  display.display();
  delay(2000);
}

void weatherornot(void)
{
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.drawBitmap(0, 0,  weatherornotpic, 128, 64, 1);
  display.display();
  delay(2000);
}

Libraries

C/C++
Include these libraries for both of the photon's in order for the code to function properly.
/*
Libraries:
ADAFRUIT_SSD1306

  This includes:
  Adafruit_GFX.cpp
  Adafruit_GFX.h
  Adafruit_SSD1306.cpp
  Adafruit_SSD1306.h


THINGSPEAK

  This includes:
  ThingSpeak.cpp
  ThingSpeak.h
*/

Credits

Rob Kabel

Rob Kabel

1 project • 0 followers
UNCC Mechanical Engineering Student
Craig Biryla

Craig Biryla

1 project • 0 followers
Mechanical Engineering Student

Comments