0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

電源を入れると傘を持ってくべきか教えてくれる電子工作デバイスを作る

0
Last updated at Posted at 2026-11-14

本屋で面白い本ないかなー、とうろうろしてて、以下の本を見つけて読みました。面白かったし、何か電子工作をしたくなりました。

雑に作る ―電子工作で好きなものを作る近道集

何を作ろうかと考えてみて、そうだ、毎朝、子供が登校するとき、玄関で天気を聞かれて、スマホを取りにいってyahoo天気をみて、傘を持ってけとか、いらんとか、寒いからジャンバー着れとか言うのがめんどい(忘れることも)ので、その辺を教えてくれるものを作ろう、となりました。

ChatGPTによる、表示画面のイメージ。

image.png

1. 設計

  • AC電源は怖いので、電池とかモバイルバッテリーとかで。
  • 電源スイッチをONすると動く。OFFすると止まる。
  • ONすると、家のwifiに接続して、Open-Meteoから天気を取得する。
  • 小さい液晶画面に画面表示する。
  • LEDがピカピカ光って、電源ONであることを視覚的に分かる様にする。
  • スピーカーを付け、傘を持っていくべきか、声でも教える。

Open-Meteoは、非商用利用ならAPIキーなしに、天気をjsonで取得可、とのこと。

マイコンは、最初、Arduino UNO R4 WiFi(5000円くらい)にしようかと思いましたが、このデバイスは、玄関に常設することになり、あまり多機能すぎるのも勿体無い。要はプログラミングできて、WiFiが繋がれば良いので、ESP32(2000円くらい)にすることにしました。どちらも、Arduino IDEでプログラミングとUSB接続書き込みができます。

image.png

秋葉原の秋月電子にて色々と購入。材料費合計6710円(高)。あと、家にあったブレッドボード用ケーブルと抵抗(220Ω)も少々。

2. おためし工作

組み立てる前に、最後まで組み立てるとどうなるか設計するのが正しいかもですが、そこは本にならって雑に。てか作ってないので動くかどうかも分かんないし(ChatGPT嘘つくし)。

ちょっとずつ動かして組み立てていきます。

2-1. 組み立て(液晶とLEDをつなぐ)

まず、こう。ESP32(マイコン)と液晶を繋ぎ、スイッチと、2色のLED2つを抵抗を挟んで繋ぎます。

image.png

こう配線しています。

image.png

2.2. Arduino IDEの設定

まず、Arduino IDEを、macにインストールします。

  1. Arduino公式ページで、Arduino IDEをダウンロード。
  2. インストール(macなので、.dmgを開き、アプリフォルダにドラッグ)。
  3. Arduino IDEを起動。
  4. 表示を日本語に変更。

デフォルトでは、esp32用の設定がないので、追加します。

  1. 設定を開く。

  2. 「追加のボードマネージャのURL」に以下を記入しOK。
    https://espressif.github.io/arduino-esp32/package_esp32_index.json
    image.png

  3. 「ボードマネージャ」でesp32を検索し、「esp32 by Espressif Systems」 をインストール。
    image.png

  4. 「ツール → ボード → esp32 → ESP32 Dev Module」 を選ぶ。
    image.png

液晶を扱うライブラリを入れます。https://learn.adafruit.com/adafruit-eyespi-breakout-board/arduino

  1. 「ツール → ライブラリを管理…」 を開く。
  2. Adafruit ILI9341 を検索し、Adafruitのライブラリをインストール(関連ライブラリもすべてインストール)。

2-3. プログラミング(表示させる/光らせる)

Arduino IDEから、USB接続したESP32に、コードをコンパイルして送り、動かすテストをします。

液晶全体が赤 → 緑 → 青と1秒ずつ切り替えるテストコード
#include <SPI.h>
#include <Adafruit_ILI9341.h>

// 液晶の CS、DC、RESET
Adafruit_ILI9341 tft(27, 26, 25);

void setup() {
  SPI.begin(18, -1, 23, 27);  // SCK、MISO未接続、MOSI、CS
  tft.begin(10000000);
}

void loop() {
  tft.fillScreen(ILI9341_RED);
  delay(1000);
  tft.fillScreen(ILI9341_GREEN);
  delay(1000);
  tft.fillScreen(ILI9341_BLUE);
  delay(1000);
}

光りました。

image.png

Arduino IDEの、シリアルモニタを開くと、マイコンからの出力を見たり、入力を渡したりできます。

image.png

3. 作り込み工作

こんな感じで、ブレッドボード上で配線し、Arduino IDE上でコードを書いて、ビルドボタンで送る(コンパイルされ、マイコンで起動する)の流れが確立できたので、あとは、各機能を作っていきます。

3-1. LEDの明るさ調整

緑LEDと青LEDをつけましたが、どちらも330Ωの抵抗だと、緑が暗く、青が明るかったので、調整しました。

image.png

image.png

  • 緑LEDは、220Ωと330Ωを並列に繋ぎ、132Ωに減らし、明るく。
  • 青LEDは、1kΩに増やし、暗く。

image.png

3-2. 液晶に天気を表示する

ここはソフト処理です。コードは少しも書かず、ChatGPT任せです。

image.png

ONすると、Wifi接続され、天気を取得し、この画面のように表示されます。Wifiの接続は、一度、SSID/PWを入れ、それを再利用する形です。

3-3. スピーカーから発声させる

DFPlayerという素子(mp3再生モジュール)を介して、スピーカーをつなぐことで、例えば、mp3ファイルの音楽を流したりできます。

ここでは、スマホで録音した、数秒の3種類の音声ファイルを作り、傘の必要性に応じて再生させます。

  • 0001.mp3(かさもってけー)
  • 0002.mp3(かさいらん)
  • 0003.mp3(わからん、じぶんでかんがえれー)

DFPlayerはmicroSDカードが挿せるので、FAT32でフォーマットし、mp3フォルダを1つ作り、そこに上記3ファイルを置きます。

なお、最初、ChatGPTには、WAVでやるように言われ、再生できませんでした(他にも色々デバッグさせられた)。

image.png

3-4. タッチパネル機能をつける

試作品を子供に見せると、「じゃあ明日のてんきは〜?」と言われました。確かに、夜に明日の準備をする時に、明日の天気が分かるといいかな。ってことで、液晶はタッチパネルでもあるので、配線を増やして、タッチされると、明日の天気が表示されるようにします(もう一度押すと、今日の天気に戻る)。

image.png

image.png

3-5. 電源を選定する

Arduino IDEからプログラムを送信するときは、ESP32にUSB接続するので、その状態だと、同時に電源が供給されます。玄関とかに設置するなら、PCにUSB接続するのではなく、独立して動く様にしたいところ。

あまり使ってないモバイルバッテリーがいいかなと思いましたが、モバイルバッテリーだと、トグルスイッチをOFFしても、何かを検出して通電し続けます(液晶が暗く光り続ける)。モバイルバッテリーにもスイッチがありますが、長押しとかの操作が子供にはめんどくさいので、つけっぱなしにされるかも。

ってことで、これを買ってみました。

これで、トグルスイッチを無くして、電池についているスイッチでON/OFFします。OFFすれば、給電されません。子供の操作も問題なし。

image.png

3-6. パッケージングする(はんだづけ/収納)

最初、ブレッドボードで試してから、ユニバーサル基盤に差し替えてはんだづけしようと思いましたが、

  • ESP32が、結構、沢山のピンが刺さっていて、容易には抜けない。変に力入れると壊しそう。
  • 液晶もDFPlayerも、どちらもピンが多い。コネクタ付きケーブルでつなげば、もう使わない、となると再利用できる(はんだづけするとその辺がめんどい)。
  • そもそも、でかいブレッドボードじゃなく、小さいブレッドボードだし、そこまで高くなかったので、完成品でそのまま使っても大丈夫。
  • LEDや抵抗は、小さいユニバーサル基盤に移して、導線をのばせば、好きな位置にLEDを表示させられる。
  • ブレッドボードの配線は、簡単に抜けない様に、グルーガンで固める。

こんな感じにすることにしました。

(グルーガンで固めた図/再利用するかもなパーツはグルーなし)
image.png

あとは、いい感じの箱におさめたく。最初、ダイソーでプラケースを入手しましたがなかなか加工が難しく。

(苦労の様子:固い/割れる/穴開けられても痕が汚い)
image.png

ちょうど、使い切ったFittyのマスクの入れ物があったので、使ってみるとぴったりでした。(いま見ると、プラケースじゃなく紙ケースに変わってるみたいですね。https://www.tamagawa-eizai.co.jp/product/mask/silky-fuwari30-2020/)

液晶にあわせて正面をカッターとハサミで切り、

image.png

支えとして、ダイソーの硬質カードケース(良質の塩ビ板が入手できると本にあった)をカットし、左右をテープで止め、ピンの位置をカットし、差し込める様にしました。

image.png

はんだづけしたLEDたち。

image.png

電池ケース。

image.png

4. 完成

できあがりです。

起動すると、Wifiをつなぎ、天気をとる。
image.png

表示される。
image.png

OFFすると止まる。
image.png

コードは以下です。

wearcast.ino
#include <WiFi.h>
#include <SPI.h>
#include <Adafruit_ILI9341.h>
#include <XPT2046_Touchscreen.h>
#include <cJSON.h>
#include <esp_http_client.h>
#include <esp_crt_bundle.h>
#include <math.h>
#include <time.h>
#include <freertos/FreeRTOS.h>
#include <freertos/queue.h>
#include <freertos/task.h>
#include "WeatherLabels.h"

constexpr int SWITCH = 32, GREEN_LED = 33, BLUE_LED = 21, AUDIO_TX = 17;
constexpr float RAIN_CHANCE = 40;
constexpr uint32_t REPEAT_MS = 6000, REFRESH_MS = 20UL * 60 * 1000;
constexpr uint16_t BG = 0x10E4, CARD = 0x218B, MUTED = 0xC67B;
constexpr uint16_t SUN = 0xFE47, SKY = 0x7E7F, TODAY_BUTTON = 0xE493;
constexpr int BUTTON_X = 228, BUTTON_Y = 175, BUTTON_W = 84, BUTTON_H = 31;
constexpr size_t MAX_FORECAST_BYTES = 8192;
const char* FORECAST_URL =
  "https://api.open-meteo.com/v1/forecast?latitude=42.985&longitude=144.382"
  "&hourly=temperature_2m,weather_code,precipitation_probability,precipitation"
  "&timezone=Asia%2FTokyo&forecast_days=2";
  //全く無関係の地域に変えてみた。

Adafruit_ILI9341 tft(27, 26, 25);
XPT2046_Touchscreen touch(22);
HardwareSerial player(2);

enum Sky { CLEAR, CLOUD, FOG, RAIN, SNOW, STORM };
struct Period { float temp, rainChance, amount; Sky sky; };
struct Forecast { Period periods[2]; char date[11]; };
struct ForecastResult {
  Forecast today, tomorrow;
  bool ok;
};
StaticQueue_t forecastQueueControl;
uint8_t forecastQueueStorage[sizeof(ForecastResult)];
QueueHandle_t forecastQueue;
tm forecastRequestDate{};
bool fetchInFlight = false;
bool discardFetch = false;
enum State { OFF, STARTING, LOADING, READY };
State state = OFF;
bool enabled = false;
bool shown = false;
Forecast forecast{}, tomorrowForecast{};
tm forecastUpdated{};
bool showTomorrow = false;
int waitFrame = -1;
uint32_t waitStartedAt = 0;
uint32_t changedAt = 0, nextFetch = 0, nextVoice = 0, flashAt = 0;
uint32_t playerReadyAt = 0, nextReconnect = 0;
bool flashing = false;

bool due(uint32_t now, uint32_t when) { return int32_t(now - when) >= 0; }
void label(int x, int y, const char* s, int size = 1, uint16_t color = ILI9341_WHITE) {
  tft.setCursor(x, y);
  tft.setTextSize(size);
  tft.setTextColor(color);
  tft.print(s);
}

void jp(int x, int y, const BitmapLabel& word, uint16_t color = ILI9341_WHITE) {
  tft.drawBitmap(x, y, word.pixels, word.width, word.height, color);
}
void center(int y, const BitmapLabel& word, uint16_t color = ILI9341_WHITE) {
  jp((320 - word.width) / 2, y, word, color);
}
void footer(const char* status) {
  tft.fillRect(0, 211, 320, 29, BG);
  label(9, 215, status, 1, MUTED);
  label(9, 229, "Weather data: Open-Meteo", 1, MUTED);
}

Sky skyOf(int code) {
  if (code == 0) return CLEAR;
  if (code <= 3) return CLOUD;
  if (code == 45 || code == 48) return FOG;
  if ((code >= 71 && code <= 77) || code == 85 || code == 86) return SNOW;
  if (code >= 95) return STORM;
  return RAIN;
}
const BitmapLabel& skyWord(Sky sky) {
  switch (sky) {
    case CLEAR: return jpClear;
    case CLOUD: return jpCloud;
    case FOG: return jpFog;
    case SNOW: return jpSnow;
    case STORM: return jpStorm;
    default: return jpRain;
  }
}
uint16_t rainTrack(const Forecast& f) {
  const float morning = f.periods[0].rainChance;
  const float evening = f.periods[1].rainChance;

  if (morning >= RAIN_CHANCE || evening >= RAIN_CHANCE) {
    return 1;
  }
  if (isfinite(morning) && isfinite(evening) &&
      morning <= 20 && evening <= 20) {
    return 2;
  }
  return 3;
}

bool umbrella(const Forecast& f) {
  return rainTrack(f) == 1;
}

bool uncertain(const Forecast& f) {
  return rainTrack(f) == 3;
}

void drawIcon(int x, int y, Sky sky) {
  if (sky == CLEAR) {
    tft.fillCircle(x, y, 10, SUN);
    for (int i = 0; i < 8; ++i) {
      float a = i * 0.785398f;
      tft.drawLine(x + roundf(14*cosf(a)), y + roundf(14*sinf(a)),
                   x + roundf(19*cosf(a)), y + roundf(19*sinf(a)), SUN);
    }
    return;
  }
  uint16_t color = sky == RAIN || sky == STORM ? SKY : MUTED;
  tft.fillCircle(x - 8, y, 7, color);
  tft.fillCircle(x + 1, y - 5, 10, color);
  tft.fillCircle(x + 10, y, 7, color);
  tft.fillRoundRect(x - 15, y, 32, 8, 4, color);
  if (sky == RAIN || sky == SNOW || sky == STORM || sky == FOG) {
    for (int i = -1; i <= 1; ++i) {
      int sx = x + 8 * i;
      if (sky == SNOW) tft.fillCircle(sx, y + 15, 2, ILI9341_WHITE);
      else if (sky == FOG) tft.drawFastHLine(x - 12, y + 14 + 3*i, 24, MUTED);
      else tft.drawLine(sx, y + 12, sx - 3, y + 19, SKY);
    }
  }
}
const uint8_t bitsTodayButton[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x01, 0xc2, 0x00, 0x00, 0x01, 0xfe, 0x00,
  0x01, 0xfe, 0x00, 0x00, 0x01, 0xff, 0x00,
  0x1f, 0xfe, 0x00, 0x70, 0x00, 0xff, 0x00,
  0x1f, 0xfc, 0x00, 0x70, 0x00, 0x00, 0x00,
  0x1f, 0xf7, 0x00, 0x70, 0x00, 0x3c, 0x00,
  0x1f, 0xff, 0x00, 0x7f, 0x07, 0xff, 0x80,
  0x1f, 0xfe, 0x00, 0x7f, 0x07, 0xff, 0x80,
  0x1f, 0xbc, 0x00, 0x7e, 0x07, 0x03, 0xc0,
  0x03, 0xfc, 0x00, 0x70, 0x00, 0x01, 0xc0,
  0x0f, 0xfe, 0x00, 0xf0, 0x00, 0x03, 0xc0,
  0x1f, 0x1c, 0x07, 0xf8, 0x00, 0x07, 0x80,
  0x1c, 0x04, 0x07, 0xfe, 0x00, 0x1f, 0x80,
  0x1f, 0xfe, 0x07, 0x7f, 0x00, 0xff, 0x00,
  0x0f, 0xfe, 0x07, 0xf7, 0x00, 0xfc, 0x00,
  0x07, 0xf8, 0x03, 0xe2, 0x00, 0xf0, 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,
};
const BitmapLabel jpTodayButton = {bitsTodayButton, 53, 23};

const uint8_t bitsTomorrowButton[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00,
  0x3f, 0x7f, 0x8f, 0xff, 0x80,
  0x3f, 0xff, 0x8f, 0xff, 0x80,
  0x3f, 0xf3, 0x8e, 0x03, 0x80,
  0x3b, 0xf3, 0x8e, 0x03, 0x80,
  0x3b, 0xff, 0x8e, 0x03, 0x80,
  0x3f, 0xff, 0x8e, 0x03, 0x80,
  0x3f, 0xf3, 0x8f, 0xff, 0x80,
  0x3b, 0xf3, 0x8f, 0xff, 0x80,
  0x3b, 0xff, 0x8e, 0x03, 0x80,
  0x3f, 0xff, 0x8e, 0x03, 0x80,
  0x3f, 0xe3, 0x8e, 0x03, 0x80,
  0x3b, 0xe3, 0x8e, 0x03, 0x80,
  0x31, 0xe3, 0x8f, 0xff, 0x80,
  0x03, 0xcf, 0x8f, 0xff, 0x80,
  0x01, 0x8f, 0x8e, 0x03, 0x80,
  0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpTomorrowButton = {bitsTomorrowButton, 36, 23};

const uint8_t bitsTomorrowTitle[] PROGMEM = {
  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, 0x60, 0x00, 0x00, 0x00, 0x70, 0x00,
  0x3f, 0x7f, 0x8f, 0xff, 0x80, 0x00, 0x00, 0x60, 0x03, 0xff, 0xf8, 0x7f, 0xfc,
  0x3f, 0xff, 0x8f, 0xff, 0x80, 0xff, 0x00, 0x61, 0xc3, 0xff, 0xf8, 0xff, 0xfc,
  0x3f, 0xf3, 0x8e, 0x03, 0x81, 0xff, 0x83, 0xff, 0xe3, 0xff, 0xf8, 0xff, 0xfc,
  0x3b, 0xf3, 0x8e, 0x03, 0x83, 0xff, 0xc7, 0xfe, 0xf0, 0x0e, 0x01, 0xff, 0xf8,
  0x3b, 0xff, 0x8e, 0x03, 0x87, 0xb9, 0xe7, 0xfe, 0x70, 0x0e, 0x03, 0xff, 0xf8,
  0x3f, 0xff, 0x8e, 0x03, 0x8f, 0x38, 0xe0, 0x60, 0x33, 0xff, 0xf9, 0xbf, 0xf0,
  0x3f, 0xf3, 0x8f, 0xff, 0x8e, 0x38, 0xe0, 0x7f, 0x83, 0xff, 0xf9, 0xff, 0xf0,
  0x3b, 0xf3, 0x8f, 0xff, 0x8e, 0x70, 0xe0, 0xff, 0xc1, 0x9f, 0x31, 0xff, 0xf0,
  0x3b, 0xff, 0x8e, 0x03, 0x8e, 0x70, 0xe3, 0xff, 0xe0, 0x1f, 0x00, 0x73, 0xf0,
  0x3f, 0xff, 0x8e, 0x03, 0x8e, 0xf1, 0xe7, 0xe4, 0xf0, 0x3f, 0x80, 0x7f, 0x30,
  0x3f, 0xe3, 0x8e, 0x03, 0x8f, 0xe1, 0xc7, 0x6e, 0x70, 0x7b, 0xc0, 0x3e, 0x34,
  0x3b, 0xe3, 0x8e, 0x03, 0x87, 0xe7, 0xc7, 0x6e, 0xf0, 0xf1, 0xe0, 0x3f, 0x3e,
  0x31, 0xe3, 0x8f, 0xff, 0x87, 0xdf, 0x87, 0xef, 0xe3, 0xe0, 0xf8, 0xff, 0xbe,
  0x03, 0xcf, 0x8f, 0xff, 0x80, 0x1f, 0x03, 0xe7, 0xc7, 0xc0, 0x7d, 0xf3, 0xfe,
  0x01, 0x8f, 0x8e, 0x03, 0x80, 0x08, 0x00, 0xc1, 0x83, 0x80, 0x39, 0xc1, 0x9c,
  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,
};
const BitmapLabel jpTomorrowTitle = {bitsTomorrowTitle, 104, 23};

const uint8_t bitsWifiConnecting[] PROGMEM = {
  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, 0x00, 0x04, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0xe1, 0xfe, 0x0c, 0x38, 0x00, 0x00, 0x03, 0xfc, 0xc0, 0x0e, 0x00, 0x70, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00,
  0x00, 0x00, 0xe3, 0xff, 0x0c, 0x38, 0x00, 0x00, 0x07, 0xff, 0xe0, 0x1f, 0x00, 0x70, 0x40, 0x00, 0x00, 0x3f, 0xe0, 0x00,
  0x00, 0x00, 0xe3, 0xfe, 0x0c, 0x18, 0x0f, 0xfc, 0x07, 0xff, 0xe0, 0x3e, 0x07, 0xff, 0xc0, 0x06, 0x00, 0x1f, 0xe0, 0x00,
  0x00, 0x00, 0x03, 0x80, 0x1f, 0xff, 0xbf, 0xff, 0x00, 0x3f, 0xe0, 0x7c, 0x07, 0xff, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00,
  0x71, 0x8f, 0xef, 0xfe, 0xff, 0xff, 0xbf, 0xff, 0x00, 0xf9, 0x80, 0xf8, 0x03, 0xff, 0xc0, 0xe7, 0x00, 0x07, 0x80, 0x00,
  0x71, 0xcf, 0xef, 0xfe, 0xff, 0xff, 0x3c, 0x07, 0x81, 0xf0, 0xc1, 0xe0, 0x00, 0xe0, 0x00, 0xdf, 0xc0, 0xff, 0xf0, 0x00,
  0x7b, 0xce, 0xef, 0xfe, 0x5c, 0x38, 0x00, 0x03, 0x9f, 0xff, 0xc3, 0xc0, 0x00, 0xe0, 0x00, 0xff, 0xe0, 0xff, 0xf0, 0x00,
  0x3b, 0xee, 0xe3, 0x8e, 0x0c, 0xb8, 0x00, 0x03, 0x9f, 0xff, 0xc3, 0xc0, 0x01, 0xff, 0xc0, 0xff, 0x70, 0xe0, 0x78, 0x00,
  0x3b, 0xfc, 0xe3, 0x8e, 0x0d, 0xf8, 0x00, 0x07, 0x9f, 0xfc, 0x03, 0xe0, 0x01, 0xff, 0xe1, 0xf7, 0x70, 0x00, 0x38, 0x00,
  0x3f, 0xfc, 0xe3, 0x8e, 0x0c, 0xf8, 0x00, 0x0f, 0x00, 0xf0, 0x01, 0xf0, 0x03, 0xe1, 0xe1, 0xff, 0x70, 0x00, 0x78, 0x00,
  0x1f, 0x7c, 0xe3, 0x8e, 0x0e, 0x20, 0x00, 0x3f, 0x00, 0xe0, 0x00, 0x7c, 0x00, 0x80, 0xe0, 0xff, 0xe0, 0x00, 0xf0, 0x00,
  0x1e, 0x78, 0xe3, 0x8e, 0x0e, 0x06, 0x03, 0xfe, 0x00, 0xe0, 0x00, 0x3e, 0x00, 0xc1, 0xe0, 0xdf, 0xe0, 0x03, 0xf0, 0x00,
  0x1e, 0x78, 0xe3, 0x8e, 0x0f, 0xfe, 0x03, 0xf8, 0x00, 0xfe, 0x00, 0x1f, 0x00, 0xff, 0xc0, 0x0f, 0x80, 0x1f, 0xe0, 0x00,
  0x0e, 0x38, 0xe3, 0x8e, 0x07, 0xfe, 0x03, 0xc0, 0x00, 0x7f, 0x00, 0x0f, 0x00, 0xff, 0x80, 0x3c, 0x00, 0x1f, 0x80, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x18, 0x00, 0x1e, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpWifiConnecting = {bitsWifiConnecting, 153, 23};

const uint8_t bitsFetchingForecast[] PROGMEM = {
  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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x80, 0x00, 0x30, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x01, 0xe0, 0x00, 0x70, 0x81, 0xff, 0xf8, 0x00, 0x00, 0x0e, 0x00, 0x07, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x0e, 0x00, 0x70, 0x00, 0x00, 0x00, 0x3f, 0xc0,
  0x0f, 0xff, 0x81, 0xc0, 0x00, 0x7f, 0x83, 0xff, 0xf8, 0x00, 0x00, 0x1f, 0xf0, 0x7f, 0xf8, 0x1c, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x1f, 0x00, 0x70, 0x40, 0x00, 0x00, 0x3f, 0xe0,
  0x3f, 0xff, 0x81, 0xc0, 0x07, 0xff, 0x81, 0xff, 0xe0, 0x00, 0x00, 0x1f, 0xf8, 0xff, 0xf8, 0x1c, 0x00, 0x00, 0x60, 0x01, 0xc0, 0x00, 0x3e, 0x07, 0xff, 0xc0, 0x06, 0x00, 0x1f, 0xe0,
  0x3f, 0xff, 0x03, 0x80, 0x07, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x7f, 0xf8, 0x1c, 0x00, 0x00, 0x70, 0x01, 0xc3, 0x00, 0x7c, 0x07, 0xff, 0xe0, 0x07, 0x00, 0x00, 0x00,
  0x3c, 0x7c, 0x03, 0x80, 0x07, 0xfd, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x1c, 0x00, 0x1c, 0x00, 0x0e, 0x70, 0x00, 0xef, 0x00, 0xf8, 0x03, 0xff, 0xc0, 0xe7, 0x00, 0x07, 0x80,
  0x00, 0xf0, 0x03, 0x80, 0x07, 0xff, 0xc7, 0xff, 0xf0, 0x00, 0x00, 0xfc, 0x70, 0x3f, 0x8c, 0x1c, 0x00, 0x0d, 0xfc, 0x00, 0xff, 0x81, 0xe0, 0x00, 0xe0, 0x00, 0xdf, 0xc0, 0xff, 0xf0,
  0x01, 0xe0, 0x07, 0xf0, 0x07, 0xff, 0x87, 0xff, 0xf3, 0xff, 0xf9, 0xfe, 0x70, 0x3f, 0xfe, 0x1c, 0x00, 0x0f, 0xfe, 0x01, 0xfe, 0x03, 0xc0, 0x00, 0xe0, 0x00, 0xff, 0xe0, 0xff, 0xf0,
  0x01, 0xc0, 0x07, 0xf0, 0x07, 0xef, 0x04, 0x1c, 0x23, 0xff, 0xf9, 0xef, 0xe0, 0xf9, 0xfe, 0x1c, 0x0e, 0x0f, 0xf7, 0x03, 0xf0, 0x03, 0xc0, 0x01, 0xff, 0xc0, 0xff, 0x70, 0xe0, 0x78,
  0x01, 0xc0, 0x0f, 0xf8, 0xc0, 0xff, 0x00, 0x1c, 0x03, 0xff, 0xf8, 0x07, 0xe0, 0xf7, 0xf0, 0x1c, 0x0e, 0x1f, 0x77, 0x07, 0x80, 0x03, 0xe0, 0x01, 0xff, 0xe1, 0xf7, 0x70, 0x00, 0x38,
  0x01, 0xc0, 0x0f, 0x39, 0xc3, 0xff, 0x80, 0x3c, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x6f, 0xc0, 0x1c, 0x0e, 0x1f, 0xf7, 0x0f, 0x00, 0x01, 0xf0, 0x03, 0xe1, 0xe1, 0xff, 0x70, 0x00, 0x78,
  0x01, 0xe0, 0x0e, 0x39, 0xc7, 0xc7, 0x00, 0x38, 0x00, 0x00, 0x00, 0x07, 0x80, 0x1e, 0xc0, 0x1c, 0x1e, 0x0f, 0xfe, 0x0e, 0x00, 0x00, 0x7c, 0x00, 0x80, 0xe0, 0xff, 0xe0, 0x00, 0xf0,
  0x01, 0xf8, 0x1e, 0x3b, 0xc7, 0x01, 0x00, 0x78, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x1c, 0xc0, 0x1e, 0x7c, 0x0d, 0xfe, 0x0f, 0x83, 0x80, 0x3e, 0x00, 0xc1, 0xe0, 0xdf, 0xe0, 0x03, 0xf0,
  0x00, 0xfe, 0x1c, 0x3f, 0x87, 0xff, 0x81, 0xf0, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x1f, 0xfc, 0x0f, 0xf8, 0x00, 0xf8, 0x07, 0xff, 0x80, 0x1f, 0x00, 0xff, 0xc0, 0x0f, 0x80, 0x1f, 0xe0,
  0x00, 0x7e, 0x1c, 0x3f, 0x03, 0xff, 0x81, 0xe0, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x0f, 0xfc, 0x0f, 0xf0, 0x03, 0xc0, 0x03, 0xff, 0x80, 0x0f, 0x00, 0xff, 0x80, 0x3c, 0x00, 0x1f, 0x80,
  0x00, 0x04, 0x08, 0x0c, 0x01, 0xfe, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0xf8, 0x03, 0xc0, 0x01, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x18, 0x00, 0x1e, 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, 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,
};
const BitmapLabel jpFetchingForecast = {bitsFetchingForecast, 240, 23};

void heading(bool tomorrow = false) {
  waitFrame = -1;
  tft.fillScreen(BG);
  jp(9, tomorrow ? 5 : 8, tomorrow ? jpTomorrowTitle : jpTitle, MUTED);
  label(218, 14, "WearCast", 1, MUTED);
}
void drawWaitStatus(uint32_t now, bool wifiConnected) {
  constexpr int frames = 3;
  const int firstFrame = wifiConnected ? frames : 0;
  if (waitFrame < firstFrame || waitFrame >= firstFrame + frames) {
    waitStartedAt = now;
  }
  const int dots = ((now - waitStartedAt) / 500) % frames + 1;
  const int frame = firstFrame + dots - 1;
  if (waitFrame == frame) return;

  waitFrame = frame;
  const BitmapLabel& message = wifiConnected ? jpFetchingForecast : jpWifiConnecting;
  constexpr int dotSpacing = 8;
  const int x = (320 - message.width - frames * dotSpacing) / 2;
  tft.fillRect(0, 101, 320, 24, BG);
  jp(x, 101, message);
  for (int i = 0; i < dots; ++i) {
    tft.fillCircle(x + message.width + 4 + i * dotSpacing, 112, 2, ILI9341_WHITE);
  }
}

void render(const Forecast& f, const tm& local, bool tomorrow) {
  heading(tomorrow);
  char line[44];
  snprintf(line, sizeof(line), "%c%c/%c%c", f.date[5], f.date[6], f.date[8], f.date[9]);
  label(280, 14, line, 1, MUTED);

  for (int i = 0; i < 2; ++i) {
    const Period& p = f.periods[i];
    int x = 8 + i*155;
    tft.fillRoundRect(x, 34, 149, 133, 9, CARD);
    jp(x + 8, 42, i ? jpReturn : jpMorning, MUTED);
    label(x + (i ? 64 : 46), 46, i ? "17:00" : "7:30", 1, MUTED);
    const BitmapLabel& word = skyWord(p.sky);
    if (word.width <= 92) jp(x + 8, 73, word);
    else jp(x + 8, 75, jpStormSmall);
    drawIcon(x + 124, 89, p.sky);
    snprintf(line, sizeof(line), "%.1f C", p.temp);
    label(x + 8, 110, line, 2);
    if (isfinite(p.rainChance)) snprintf(line, sizeof(line), "%.0f%%", p.rainChance);
    else snprintf(line, sizeof(line), "--");
    jp(x + 8, 139, jpRainChance, MUTED);
    label(x + 49, 137, line, 2, SKY);
  }

  constexpr int bannerX = 8, bannerW = BUTTON_X - bannerX - 6;
  const bool bringUmbrella = umbrella(f);
  const BitmapLabel& message = bringUmbrella ? jpUmbrella :
    (uncertain(f) ? jpUnknown : jpNoUmbrella);
  tft.fillRoundRect(bannerX, BUTTON_Y, bannerW, BUTTON_H, 7,
                    bringUmbrella ? SUN : CARD);
  jp(bannerX + (bannerW - message.width) / 2,
     BUTTON_Y + (BUTTON_H - message.height) / 2, message,
     bringUmbrella ? BG : MUTED);

  const BitmapLabel& button = tomorrow ? jpTodayButton : jpTomorrowButton;
  const bool tomorrowAvailable = tomorrowForecast.date[0] != '\0';
  const uint16_t dayColor = tomorrow ? TODAY_BUTTON : SKY;
  tft.fillRoundRect(BUTTON_X, BUTTON_Y, BUTTON_W, BUTTON_H, 7,
                    tomorrowAvailable ? dayColor : CARD);
  jp(BUTTON_X + (BUTTON_W - button.width) / 2,
     BUTTON_Y + (BUTTON_H - button.height) / 2, button,
     tomorrowAvailable ? BG : MUTED);
  strftime(line, sizeof(line), "Updated %H:%M JST", &local);
  footer(line);
}

void pollDayTap(uint32_t now) {
  static bool held = false;
  static uint32_t lastTouchAt = 0;
  if (!shown) {
    held = false;
    return;
  }
  if (!touch.touched()) {
    if (now - lastTouchAt >= 90) held = false;
    return;
  }
  lastTouchAt = now;
  if (held) return;
  held = true;
  if (tomorrowForecast.date[0] == '\0') return;

  showTomorrow = !showTomorrow;
  render(showTomorrow ? tomorrowForecast : forecast, forecastUpdated, showTomorrow);
}

esp_err_t receive(esp_http_client_event_t* event) {
  if (event->event_id != HTTP_EVENT_ON_DATA) return ESP_OK;
  String* body = static_cast<String*>(event->user_data);
  if (body->length() + event->data_len > MAX_FORECAST_BYTES) return ESP_FAIL;
  return body->concat(static_cast<const char*>(event->data), event->data_len)
    ? ESP_OK : ESP_ERR_NO_MEM;
}

float number(cJSON* node) {
  return cJSON_IsNumber(node) ? node->valuedouble : NAN;
}

cJSON* field(cJSON* node, const char* name) {
  return cJSON_GetObjectItemCaseSensitive(node, name);
}

int hourIndex(cJSON* hourly, const char* date, int hour) {
  char target[17];
  snprintf(target, sizeof(target), "%.10sT%02d:00", date, hour);
  cJSON* times = field(hourly, "time");
  for (int i = 0; i < cJSON_GetArraySize(times); ++i) {
    const char* time = cJSON_GetStringValue(cJSON_GetArrayItem(times, i));
    if (time && strcmp(target, time) == 0) return i;
  }
  return -1;
}
float at(cJSON* hourly, const char* key, int index) {
  return index < 0 ? NAN : number(cJSON_GetArrayItem(field(hourly, key), index));
}

bool decodeDay(cJSON* hourly, const char* date, Forecast& f) {
  int h7 = hourIndex(hourly, date, 7), h8 = hourIndex(hourly, date, 8);
  int h17 = hourIndex(hourly, date, 17);
  bool valid = h7 >= 0 && h8 >= 0 && h17 >= 0;
  for (int i = 0; i < 2 && valid; ++i) {
    Period& p = f.periods[i];
    int weatherHour = i ? h17 : h8;
    p.temp = at(hourly, "temperature_2m", weatherHour);
    if (!i) p.temp = (p.temp + at(hourly, "temperature_2m", h7)) / 2;
    float code = at(hourly, "weather_code", weatherHour);
    p.rainChance = at(hourly, "precipitation_probability", weatherHour);
    p.amount = at(hourly, "precipitation", weatherHour);
    valid = isfinite(p.temp) && code >= 0 && code <= 99;
    if (valid) p.sky = skyOf(static_cast<int>(code));
  }
  if (valid) memcpy(f.date, date, sizeof(f.date));
  return valid;
}

bool fetchWeather(const tm& local, Forecast& today, Forecast& tomorrow) {
  String body;
  if (!body.reserve(MAX_FORECAST_BYTES)) return false;
  esp_http_client_config_t config = {};
  config.url = FORECAST_URL;
  config.timeout_ms = 6500;
  config.crt_bundle_attach = esp_crt_bundle_attach;
  config.event_handler = receive;
  config.user_data = &body;
  esp_http_client_handle_t client = esp_http_client_init(&config);
  if (!client) return false;
  esp_err_t result = esp_http_client_perform(client);
  int status = esp_http_client_get_status_code(client);
  bool complete = esp_http_client_is_complete_data_received(client);
  esp_http_client_cleanup(client);
  if (result != ESP_OK || status != 200 || !complete) {
    Serial.printf("Weather request failed: %s, HTTP %d\n", esp_err_to_name(result), status);
    return false;
  }
  char date[11];
  strftime(date, sizeof(date), "%Y-%m-%d", &local);
  cJSON* root = cJSON_Parse(body.c_str());
  if (!root) return false;
  cJSON* hourly = field(root, "hourly");
  const bool valid = decodeDay(hourly, date, today);

  const int midnight = hourIndex(hourly, date, 0);
  cJSON* times = field(hourly, "time");
  const char* nextMidnight = midnight < 0 ? nullptr :
    cJSON_GetStringValue(cJSON_GetArrayItem(times, midnight + 24));
  if (valid && nextMidnight && strlen(nextMidnight) == 16 &&
      strcmp(nextMidnight + 10, "T00:00") == 0) {
    char nextDate[11] = {};
    memcpy(nextDate, nextMidnight, 10);
    decodeDay(hourly, nextDate, tomorrow);
  }
  cJSON_Delete(root);
  if (!valid) Serial.println("Forecast is missing today's school hours");
  return valid;
}

void fetchForecastTask(void*) {
  ForecastResult result{};
  result.ok = fetchWeather(forecastRequestDate, result.today, result.tomorrow);
  xQueueSend(forecastQueue, &result, 0);
  vTaskDelete(nullptr);
}

void applyForecast(const ForecastResult& result, uint32_t now) {
  if (!result.ok) {
    nextFetch = now + 30000;
    if (!shown) {
      heading();
      center(100, jpError);
    }
    footer(shown ? "Update failed - last weather shown" : "Retry in 30 seconds");
    return;
  }

  const bool first = !shown;
  forecast = result.today;
  tomorrowForecast = result.tomorrow;
  if (first || tomorrowForecast.date[0] == '\0') showTomorrow = false;
  shown = true;
  state = READY;
  forecastUpdated = forecastRequestDate;
  getLocalTime(&forecastUpdated, 15);
  render(showTomorrow ? tomorrowForecast : forecast, forecastUpdated, showTomorrow);
  flashAt = now;
  flashing = true;
  nextFetch = now + REFRESH_MS;
  if (first) nextVoice = now;
}


// The ESP32's Wi-Fi driver stores the settings in flash. Serial input is never echoed.
bool pollWiFiSetup() {
  static enum { COMMAND, NAME, PASSWORD } stage = COMMAND;
  static char name[33] = {};
  static char line[65] = {};
  static size_t used = 0;
  static bool overflow = false;

  while (Serial.available()) {
    char c = Serial.read();
    if (c == '\r') continue;
    if (c != '\n') {
      if (used < sizeof(line) - 1 && c != '\0') line[used++] = c;
      else overflow = true;
      continue;
    }
    line[used] = '\0';
    if (stage == COMMAND) {
      if (!overflow && strcmp(line, "wifi") == 0) {
        stage = NAME;
        Serial.println("Enter Wi-Fi name, then press Enter:");
        footer("USB Wi-Fi setup: enter network name");
      }
    } else if (stage == NAME) {
      if (overflow || used == 0 || used > 32) {
        Serial.println("Enter a Wi-Fi name of 1 to 32 bytes:");
      } else {
        memcpy(name, line, used + 1);
        stage = PASSWORD;
        Serial.println("Enter Wi-Fi password, then press Enter (not echoed):");
        footer("USB Wi-Fi setup: enter password");
      }
    } else if (overflow || used < 8) {
      Serial.println("Password must be 8 to 64 characters. Try again:");
    } else {
      WiFi.begin(name, line);
      memset(name, 0, sizeof(name));
      stage = COMMAND;
      Serial.println("Connecting with the new Wi-Fi settings...");
      footer("Connecting to Wi-Fi...");
    }
    memset(line, 0, sizeof(line));
    used = 0;
    overflow = false;
  }
  return stage != COMMAND;
}

void playerCommand(uint8_t command, uint16_t arg) {
  uint8_t frame[] = {0x7e, 0xff, 0x06, command, 0, uint8_t(arg >> 8), uint8_t(arg), 0, 0, 0xef};
  uint16_t sum = 0;
  for (int i = 1; i <= 6; ++i) sum += frame[i];
  uint16_t check = uint16_t(0 - sum);
  frame[7] = check >> 8;
  frame[8] = check & 0xff;
  player.write(frame, sizeof(frame));
}

uint16_t voiceTrack(const Forecast& f) {
  return rainTrack(f);
}

void updateLights(uint32_t now) {
  static bool wasReady = false;
  static uint32_t readySince = 0;

  bool ready = enabled && state == READY;
  if (ready && !wasReady) readySince = now;
  wasReady = ready;

  uint32_t phase = (now - readySince) % 3000;
  bool blink = ready && phase < 2000 && (phase / 110) % 2 == 0;

  digitalWrite(GREEN_LED, enabled && (state == STARTING || blink));
  digitalWrite(BLUE_LED, enabled && (state == LOADING || blink));
}

void switchOff() {
  if (fetchInFlight) discardFetch = true;
  enabled = false;
  state = OFF;
  shown = false;
  flashing = false;
  digitalWrite(GREEN_LED, LOW);
  digitalWrite(BLUE_LED, LOW);
  playerCommand(0x16, 0); // Stop playback.
  tft.fillScreen(ILI9341_BLACK);
}

void pollSwitch(uint32_t now) {
  static bool last = false;
  static uint32_t since = 0;
  bool reading = digitalRead(SWITCH) == LOW;
  if (reading != last) {
    last = reading;
    since = now;
  }
  if (reading == enabled || now - since < 35) return;
  if (!reading) {
    switchOff();
    return;
  }
  enabled = true;
  showTomorrow = false;
  state = STARTING;
  changedAt = now;
  nextFetch = now;
  nextVoice = now;
  heading();
}

void setup() {
  Serial.begin(115200);
  forecastQueue = xQueueCreateStatic(1, sizeof(ForecastResult),
                                     forecastQueueStorage, &forecastQueueControl);
  pinMode(SWITCH, INPUT_PULLUP);
  pinMode(GREEN_LED, OUTPUT);
  pinMode(BLUE_LED, OUTPUT);
  digitalWrite(GREEN_LED, LOW);
  digitalWrite(BLUE_LED, LOW);
  player.begin(9600, SERIAL_8N1, 16, AUDIO_TX); // GPIO16 / DFPlayer TX is left unwired.
  playerReadyAt = millis() + 2500;
  SPI.begin(18, 19, 23, 27);
  touch.begin(SPI);
  tft.begin(10000000);
  tft.setRotation(1);
  tft.setTextWrap(false);
  tft.fillScreen(ILI9341_BLACK);
  WiFi.persistent(true);
  WiFi.begin();
  WiFi.setAutoReconnect(true);
  Serial.println("Flip the switch to start. To change Wi-Fi, send: wifi");
}

void loop() {

  static unsigned long lastSwitchLog = 0;
  if (millis() - lastSwitchLog >= 1000) {
    lastSwitchLog = millis();
    Serial.print("GPIO32 = ");
    Serial.println(digitalRead(32));
  }

  uint32_t now = millis();
  pollSwitch(now);
  updateLights(now);
  bool provisioning = pollWiFiSetup();
  if (provisioning && fetchInFlight) discardFetch = true;
  ForecastResult result{};
  if (xQueueReceive(forecastQueue, &result, 0) == pdPASS) {
    fetchInFlight = false;
    if (enabled && !provisioning && !discardFetch && digitalRead(SWITCH) == LOW) {
      applyForecast(result, now);
    }
  }
  // A standby screen is normally blank; allow the setup prompts when provisioning.
  if (!enabled || provisioning) {
    delay(10);
    return;
  }
  const bool wifiConnected = WiFi.status() == WL_CONNECTED;
  if (!shown && (!wifiConnected || due(now, nextFetch))) {
    drawWaitStatus(now, wifiConnected);
  }
  if (state == STARTING) {
    if (now - changedAt < 650) return;
    state = LOADING;
    updateLights(now);
  }

  static bool clockStarted = false;
  if (!wifiConnected) {
    state = LOADING;
    if (due(now, nextReconnect)) {
      footer("Wi-Fi offline. USB setup: send wifi");
      WiFi.reconnect();
      nextReconnect = now + 15000;
    }
  } else {
    if (shown) state = READY;
    if (!clockStarted) {
      configTime(9 * 3600, 0, "ntp.nict.jp", "time.google.com", "pool.ntp.org");
      clockStarted = true;
    }
    tm local;
    if (!fetchInFlight && due(now, nextFetch) && getLocalTime(&local, 15)) {
      forecastRequestDate = local;
      discardFetch = false;
      fetchInFlight = xTaskCreate(fetchForecastTask, "forecast", 8192, nullptr,
                                  1, nullptr) == pdPASS;
      if (!fetchInFlight) applyForecast(ForecastResult{}, now);
    }
  }

  if (shown && due(now, nextVoice) && due(now, playerReadyAt)) {
    // Do not repeat yesterday's advice after midnight.
    tm local;
    char date[11] = {};
    if (getLocalTime(&local, 15)) strftime(date, sizeof(date), "%Y-%m-%d", &local);
    if (strcmp(date, forecast.date) == 0) {
      static bool volumeSet = false;
      if (!volumeSet) {
        playerCommand(0x06, 24); //音量。12は小さい。20もちょい足りない。上限30まで。
        delay(110);
        volumeSet = true;
      }
      playerCommand(0x12, voiceTrack(forecast));
      flashAt = now;
      flashing = true;
      nextVoice = millis() + REPEAT_MS;
    } else {
      playerCommand(0x16, 0);
      if (fetchInFlight) discardFetch = true;
      shown = false;
      nextFetch = now;
      state = LOADING;
      heading();
    }
  }

  pollDayTap(millis());

  delay(20);
}


WeatherLabels.h
#pragma once
#include <Arduino.h>

struct BitmapLabel { const uint8_t* pixels; int width; int height; };

const uint8_t bitsTitle[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x0c, 0x00,
  0x03, 0x00, 0x01, 0xfc, 0x00, 0x00, 0x01, 0xfc, 0x00, 0xfe, 0x00, 0x60, 0x80, 0x0f, 0xf0, 0x1c,
  0x00, 0x03, 0xf8, 0x3f, 0xfc, 0x00, 0x40, 0x00, 0x0c, 0x01, 0xff, 0x80, 0x64, 0xe3, 0xff, 0xf0,
  0x18, 0x00, 0x7f, 0xf8, 0x3f, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x03, 0x99, 0xc3, 0xfc, 0x63, 0xff,
  0xe0, 0x18, 0x00, 0x7f, 0x80, 0x00, 0xee, 0x00, 0xc0, 0x01, 0xfc, 0x07, 0x38, 0xc3, 0xf0, 0x70,
  0x07, 0x00, 0x38, 0x00, 0x01, 0xdc, 0x3f, 0xfe, 0x00, 0xfc, 0x0f, 0xff, 0x06, 0x30, 0xc0, 0x60,
  0x20, 0x0e, 0x00, 0x30, 0x00, 0x7f, 0xfc, 0x3f, 0xf0, 0x00, 0xfc, 0x07, 0x07, 0x06, 0x30, 0xe0,
  0x6f, 0x00, 0x0c, 0x00, 0x3e, 0x00, 0x7f, 0xe0, 0x00, 0x30, 0x00, 0xe0, 0x00, 0x03, 0x0c, 0x30,
  0x60, 0x7f, 0xc0, 0x1c, 0x00, 0x7f, 0x00, 0x00, 0x60, 0x03, 0xf8, 0x00, 0xc0, 0x00, 0x03, 0x0c,
  0x70, 0xe1, 0xf0, 0xe0, 0x18, 0x00, 0x73, 0x08, 0x07, 0xf0, 0x0f, 0xf8, 0x00, 0x40, 0x00, 0x03,
  0x0e, 0x60, 0xc3, 0xe0, 0x60, 0x18, 0x00, 0x63, 0x0c, 0x1f, 0xf0, 0x1c, 0x18, 0x07, 0xe0, 0x00,
  0x07, 0x06, 0xe1, 0xc7, 0x64, 0x60, 0x1c, 0x00, 0xe3, 0x0c, 0x38, 0x30, 0x38, 0x00, 0x0f, 0xf8,
  0x00, 0x0e, 0x07, 0xc3, 0xc6, 0x6c, 0x60, 0x1e, 0x00, 0xc3, 0x18, 0x70, 0x00, 0x18, 0x08, 0x0c,
  0x7c, 0x00, 0x7e, 0x03, 0x9f, 0x87, 0x66, 0x60, 0x0f, 0xc0, 0xc3, 0xb8, 0x30, 0x10, 0x1f, 0xf8,
  0x0c, 0xce, 0x01, 0xf8, 0x00, 0x1e, 0x03, 0xe7, 0xe0, 0x07, 0xc1, 0xc3, 0xf0, 0x3f, 0xf0, 0x07,
  0xf0, 0x0f, 0xc4, 0x00, 0xe0, 0x00, 0x08, 0x01, 0xe3, 0x80, 0x01, 0xc1, 0x81, 0xe0, 0x0f, 0xe0,
  0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00,
};
const BitmapLabel jpTitle = {bitsTitle, 136, 17};

const uint8_t bitsMorning[] PROGMEM = {
  0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xe0, 0x00, 0x07, 0x7c, 0x00, 0x60, 0x00, 0x3f,
  0xfc, 0x00, 0x7f, 0x00, 0x3f, 0x80, 0x1f, 0xfe, 0x00, 0x06, 0x30, 0x1f, 0xf0, 0x00, 0x07, 0xf8,
  0x00, 0x38, 0x00, 0x0f, 0xfc, 0x00, 0x18, 0x00, 0x1e, 0x7e, 0x03, 0xfc, 0x00, 0x3e, 0x66, 0x07,
  0xfe, 0x00, 0x36, 0xc6, 0x0e, 0x0e, 0x00, 0x33, 0xc6, 0x1c, 0x00, 0x00, 0x63, 0x86, 0x1c, 0x00,
  0x00, 0x77, 0x0e, 0x0e, 0x0c, 0x00, 0x3e, 0x7c, 0x0f, 0xfc, 0x00, 0x1c, 0x78, 0x03, 0xf8, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpMorning = {bitsMorning, 34, 17};

const uint8_t bitsReturn[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x03, 0xf0, 0x03, 0x00, 0x00, 0x06, 0x00,
  0x03, 0xf8, 0x03, 0x38, 0x00, 0x06, 0x08, 0x00, 0x30, 0x03, 0x7e, 0x00, 0x0f, 0x8c, 0x00, 0x00,
  0x07, 0xce, 0x00, 0x7f, 0xee, 0x0f, 0xf8, 0x07, 0x86, 0x00, 0x6c, 0x66, 0x0f, 0xf8, 0x07, 0x87,
  0x00, 0x0c, 0x67, 0x00, 0x70, 0x07, 0x03, 0x00, 0x0c, 0x63, 0x00, 0xe0, 0x07, 0x03, 0x00, 0x1c,
  0x63, 0x01, 0xc0, 0x07, 0x07, 0x00, 0x18, 0x63, 0x03, 0xe0, 0x06, 0x07, 0x00, 0x18, 0x60, 0x07,
  0xf0, 0x00, 0x06, 0x00, 0x38, 0x60, 0x0e, 0x30, 0x00, 0x0e, 0x00, 0x34, 0xe0, 0x1c, 0x30, 0x00,
  0x3c, 0x00, 0x77, 0xc0, 0x38, 0x3f, 0x81, 0xf8, 0x00, 0x67, 0x80, 0x10, 0x1f, 0x80, 0xe0, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpReturn = {bitsReturn, 51, 17};

const uint8_t bitsClear[] PROGMEM = {
  0x0c, 0x01, 0xc0, 0x07, 0x00, 0x00, 0x0e, 0x01, 0xc0, 0x07, 0x00, 0x00, 0x1e, 0x01, 0xc0, 0x07,
  0x00, 0x00, 0x1c, 0x01, 0xc0, 0x07, 0x00, 0x00, 0x1c, 0x01, 0xc4, 0x07, 0x83, 0xc0, 0x1c, 0x7f,
  0xfc, 0x7f, 0x8f, 0xe0, 0x1c, 0x7f, 0xfc, 0x3f, 0x1f, 0xe0, 0x1c, 0x7f, 0xf0, 0x07, 0x7c, 0xe0,
  0x1c, 0x01, 0xc0, 0x07, 0xf0, 0xe0, 0x18, 0x01, 0xc0, 0x07, 0xe0, 0xe0, 0x18, 0x01, 0xc0, 0x07,
  0xc0, 0xe0, 0x38, 0x01, 0xc0, 0x07, 0x80, 0xe0, 0x3b, 0x01, 0xc0, 0x0f, 0x01, 0xc0, 0x3b, 0x1f,
  0xc0, 0x1f, 0x01, 0xc0, 0x3f, 0x7f, 0xe0, 0x3f, 0x01, 0xc4, 0x3e, 0x7b, 0xf8, 0x7f, 0x01, 0xc6,
  0x1e, 0xe1, 0xfc, 0x77, 0x01, 0xce, 0x1e, 0xe1, 0xdc, 0x27, 0x01, 0xce, 0x1c, 0x7f, 0xcc, 0x07,
  0x01, 0xfc, 0x1c, 0x7f, 0xc0, 0x07, 0x01, 0xf8, 0x1c, 0x1f, 0x00, 0x07, 0x00, 0xf0, 0x00, 0x00,
  0x00, 0x07, 0x00, 0x00,
};
const BitmapLabel jpClear = {bitsClear, 48, 22};

const uint8_t bitsCloud[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xe0, 0x00, 0x07,
  0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0xe0, 0x00, 0x07, 0x0e, 0x00, 0x00, 0x0f, 0x80, 0x00, 0xe0,
  0x00, 0x07, 0x3f, 0x80, 0x00, 0x1f, 0x00, 0x00, 0xe0, 0x00, 0x07, 0x7f, 0xc0, 0x00, 0x3e, 0x00,
  0x1f, 0xe7, 0x00, 0x07, 0xf1, 0xc0, 0x00, 0x7c, 0x00, 0x1f, 0xff, 0x00, 0x07, 0xe0, 0xe0, 0x00,
  0xf8, 0x00, 0x0f, 0xff, 0x00, 0x07, 0xc0, 0xe0, 0x03, 0xe0, 0x00, 0x01, 0xe0, 0x00, 0x07, 0x80,
  0xe0, 0x07, 0xc0, 0x00, 0x01, 0xc0, 0x00, 0x07, 0x80, 0xe0, 0x07, 0x80, 0x00, 0x01, 0xc0, 0x00,
  0x07, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x19, 0xc0, 0x20, 0x07, 0x00, 0xe0, 0x07, 0x80, 0x00, 0x1f,
  0xff, 0x70, 0x07, 0x00, 0xe0, 0x07, 0xc0, 0x00, 0x1f, 0xff, 0x70, 0x07, 0x00, 0xe0, 0x03, 0xe0,
  0x00, 0x03, 0xf8, 0x38, 0x07, 0x00, 0xe0, 0x00, 0xf8, 0x00, 0x01, 0xc0, 0x38, 0x00, 0x01, 0xe0,
  0x00, 0x7c, 0x00, 0x01, 0xc0, 0x38, 0x00, 0x01, 0xc0, 0x00, 0x3e, 0x00, 0x01, 0xc0, 0x38, 0x00,
  0x03, 0xc0, 0x00, 0x1f, 0x00, 0x01, 0xc0, 0x78, 0x00, 0x0f, 0x80, 0x00, 0x0f, 0x80, 0x01, 0xe0,
  0xf0, 0x00, 0x7f, 0x00, 0x00, 0x07, 0xc0, 0x00, 0xff, 0xf0, 0x01, 0xfe, 0x00, 0x00, 0x03, 0xc0,
  0x00, 0x7f, 0xc0, 0x00, 0xf8, 0x00, 0x00, 0x01, 0x80, 0x00, 0x1f, 0x00, 0x00, 0xc0, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpCloud = {bitsCloud, 72, 24};

const uint8_t bitsFog[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07,
  0x0e, 0x00, 0x00, 0x38, 0xf0, 0x07, 0x3f, 0x80, 0x00, 0xff, 0xf0, 0x07, 0x7f, 0xc0, 0x1f, 0xff,
  0xe0, 0x07, 0xf1, 0xc0, 0x1f, 0xfe, 0x00, 0x07, 0xe0, 0xe0, 0x00, 0x0e, 0x18, 0x07, 0xc0, 0xe0,
  0x00, 0x0f, 0xf8, 0x07, 0x80, 0xe0, 0x1f, 0xff, 0xf8, 0x07, 0x80, 0xe0, 0x1f, 0xff, 0xc0, 0x07,
  0x00, 0xe0, 0x1f, 0xf7, 0x80, 0x07, 0x00, 0xe0, 0x00, 0x03, 0x80, 0x07, 0x00, 0xe0, 0x00, 0x01,
  0xc0, 0x07, 0x00, 0xe0, 0x03, 0xff, 0xe0, 0x07, 0x00, 0xe0, 0x07, 0xff, 0xe0, 0x00, 0x01, 0xe0,
  0x0f, 0x01, 0xc0, 0x00, 0x01, 0xc0, 0x0e, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x0e, 0x00, 0x00, 0x00,
  0x0f, 0x80, 0x0f, 0x01, 0xe0, 0x00, 0x7f, 0x00, 0x0f, 0xff, 0xe0, 0x01, 0xfe, 0x00, 0x03, 0xff,
  0xe0, 0x00, 0xf8, 0x00, 0x00, 0x78, 0x00, 0x00, 0xc0, 0x00,
};
const BitmapLabel jpFog = {bitsFog, 48, 23};

const uint8_t bitsRain[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x03, 0x00, 0x00, 0xe0, 0x00, 0x07,
  0x03, 0x80, 0x00, 0xe0, 0xf0, 0x07, 0x03, 0x80, 0x1f, 0xff, 0xf0, 0x07, 0x07, 0x00, 0x1f, 0xff,
  0xf0, 0x07, 0x7f, 0x80, 0x1f, 0xfc, 0x00, 0x07, 0xff, 0xe0, 0x00, 0xc1, 0x80, 0x07, 0xff, 0xf0,
  0x00, 0xc3, 0x80, 0x0f, 0x8e, 0xf8, 0x00, 0xff, 0xc0, 0x0f, 0x8e, 0x38, 0x03, 0xff, 0xe0, 0x1f,
  0x8e, 0x1c, 0x07, 0xe7, 0xf8, 0x1d, 0x9c, 0x1c, 0x0f, 0xc7, 0x38, 0x39, 0xdc, 0x1c, 0x1e, 0xce,
  0x3c, 0x39, 0xf8, 0x1c, 0x1c, 0xce, 0x1c, 0x38, 0xf8, 0x1c, 0x38, 0xdc, 0x1c, 0x38, 0xf0, 0x1c,
  0x38, 0xfc, 0x1c, 0x38, 0xf0, 0x3c, 0x38, 0xf8, 0x3c, 0x39, 0xe0, 0x78, 0x38, 0xf0, 0x78, 0x3f,
  0xc0, 0xf8, 0x3f, 0xe1, 0xf0, 0x1f, 0x87, 0xf0, 0x1f, 0xcf, 0xe0, 0x0f, 0x0f, 0xc0, 0x0f, 0x0f,
  0xc0, 0x00, 0x0f, 0x80, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpRain = {bitsRain, 48, 23};

const uint8_t bitsSnow[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x30, 0x00, 0x00, 0x0e, 0x00, 0x00,
  0x38, 0x00, 0x1c, 0x0e, 0x00, 0x00, 0x38, 0xf0, 0x1c, 0x0f, 0x80, 0x00, 0xff, 0xf0, 0x1c, 0x3f,
  0xe0, 0x1f, 0xff, 0xe0, 0x18, 0xff, 0xf0, 0x1f, 0xfe, 0x00, 0x19, 0xfe, 0x78, 0x00, 0x0e, 0x18,
  0x3b, 0xce, 0x3c, 0x00, 0x0f, 0xf8, 0x3f, 0x8e, 0x1c, 0x1f, 0xff, 0xf8, 0x3f, 0x0e, 0x1c, 0x1f,
  0xff, 0xc0, 0x3e, 0x0e, 0x1c, 0x1f, 0xf7, 0x80, 0x3c, 0x8e, 0x1c, 0x00, 0x03, 0x80, 0x3d, 0x8e,
  0x1c, 0x00, 0x01, 0xc0, 0x3d, 0xce, 0x3c, 0x03, 0xff, 0xe0, 0x39, 0xfe, 0x78, 0x07, 0xff, 0xe0,
  0x38, 0xff, 0xf0, 0x0f, 0x01, 0xc0, 0x38, 0x7f, 0xe0, 0x0e, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x0e,
  0x00, 0x00, 0x00, 0x78, 0x00, 0x0f, 0x01, 0xe0, 0x00, 0xf0, 0x00, 0x0f, 0xff, 0xe0, 0x01, 0xf0,
  0x00, 0x03, 0xff, 0xe0, 0x00, 0xc0, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpSnow = {bitsSnow, 48, 24};

const uint8_t bitsStorm[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00,
  0x00, 0x00, 0x01, 0xc0, 0x00, 0x07, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x0f, 0xf8, 0x00, 0x01, 0xc0,
  0x00, 0x07, 0x0e, 0x00, 0x01, 0xc0, 0x00, 0x0f, 0xfc, 0x00, 0x01, 0xc0, 0x00, 0x07, 0x3f, 0x80,
  0x01, 0xc0, 0x00, 0x0f, 0xf8, 0x00, 0x01, 0xc9, 0xc0, 0x07, 0x7f, 0xc0, 0x01, 0xc0, 0x60, 0x00,
  0x38, 0x00, 0x3f, 0xf9, 0xf0, 0x07, 0xf1, 0xc0, 0x01, 0xe0, 0xf0, 0x00, 0x38, 0x70, 0x3f, 0xf9,
  0xfc, 0x07, 0xe0, 0xe0, 0x3f, 0xfc, 0x70, 0x00, 0x70, 0x70, 0x3f, 0x80, 0x7e, 0x07, 0xc0, 0xe0,
  0x3f, 0xfe, 0x38, 0x00, 0x70, 0x70, 0x03, 0x80, 0x1c, 0x07, 0x80, 0xe0, 0x3b, 0x8e, 0x38, 0x00,
  0x70, 0x70, 0x07, 0x01, 0xc0, 0x07, 0x80, 0xe0, 0x03, 0x87, 0x1c, 0x07, 0xfc, 0x70, 0x07, 0x01,
  0xc0, 0x07, 0x00, 0xe0, 0x07, 0x07, 0x1c, 0x0f, 0xff, 0xf0, 0x07, 0x01, 0x80, 0x07, 0x00, 0xe0,
  0x07, 0x07, 0x0e, 0x1f, 0xff, 0xf0, 0x0e, 0x01, 0x80, 0x07, 0x00, 0xe0, 0x07, 0x07, 0x0e, 0x38,
  0xe3, 0xf8, 0x0e, 0x01, 0x80, 0x07, 0x00, 0xe0, 0x0f, 0x07, 0x0e, 0x39, 0xc0, 0xfe, 0x1e, 0x01,
  0xc0, 0x07, 0x00, 0xe0, 0x0e, 0x07, 0x00, 0x71, 0xc0, 0xfe, 0x1c, 0x7f, 0xc0, 0x00, 0x01, 0xe0,
  0x0e, 0x0e, 0x00, 0x73, 0xc1, 0xce, 0x3c, 0xff, 0xf0, 0x00, 0x01, 0xc0, 0x1c, 0x0e, 0x00, 0x73,
  0x83, 0xc4, 0x78, 0xe1, 0xf8, 0x00, 0x03, 0xc0, 0x1d, 0x0e, 0x00, 0x3f, 0x87, 0x80, 0x39, 0xc1,
  0xfc, 0x00, 0x0f, 0x80, 0x3d, 0xfe, 0x00, 0x3f, 0x0f, 0x80, 0x00, 0xe3, 0xdc, 0x00, 0x7f, 0x00,
  0x79, 0xfc, 0x00, 0x1e, 0x1f, 0x00, 0x00, 0xff, 0x8c, 0x01, 0xfe, 0x00, 0x38, 0xf8, 0x00, 0x00,
  0x1c, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0c,
  0x00, 0x00, 0xc0, 0x00,
};
const BitmapLabel jpStorm = {bitsStorm, 96, 23};

const uint8_t bitsStormSmall[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x04, 0x00, 0x03,
  0x80, 0x00, 0xe0, 0x00, 0x03, 0x00, 0x01, 0xfe, 0x00, 0x03, 0x00, 0x00, 0xe7, 0x80, 0x03, 0x00,
  0x00, 0xfe, 0x00, 0x03, 0x26, 0x00, 0xef, 0xc0, 0x03, 0x03, 0x00, 0x0e, 0x00, 0x3f, 0xef, 0x80,
  0xdf, 0xe0, 0x1f, 0xe3, 0x80, 0x0e, 0x38, 0x3f, 0xe7, 0xe0, 0xf8, 0x70, 0x7f, 0xf1, 0x80, 0x0c,
  0x38, 0x06, 0x01, 0xe0, 0xf0, 0x70, 0x7f, 0x39, 0xc0, 0x0c, 0x38, 0x0e, 0x04, 0x40, 0xf0, 0x30,
  0x06, 0x38, 0xc0, 0x3c, 0x38, 0x0e, 0x0e, 0x00, 0xe0, 0x30, 0x0e, 0x18, 0xe1, 0xff, 0xb0, 0x0c,
  0x0e, 0x00, 0xe0, 0x30, 0x0e, 0x18, 0xe3, 0xff, 0xf0, 0x1c, 0x0e, 0x00, 0xe0, 0x30, 0x0c, 0x18,
  0x63, 0xb9, 0xf8, 0x1c, 0x0e, 0x00, 0xc0, 0x70, 0x1c, 0x38, 0x47, 0x38, 0x7e, 0x38, 0xfe, 0x00,
  0xc0, 0x70, 0x1c, 0x38, 0x06, 0x30, 0x7e, 0x39, 0xff, 0x00, 0x00, 0xe0, 0x18, 0x38, 0x07, 0x70,
  0xe6, 0x73, 0x8f, 0xc0, 0x00, 0xe0, 0x3a, 0x30, 0x07, 0xe0, 0xe0, 0x33, 0x8f, 0xe0, 0x03, 0xc0,
  0x33, 0xf0, 0x03, 0xe1, 0xc0, 0x03, 0x8e, 0xc0, 0x1f, 0x80, 0x73, 0xe0, 0x01, 0xc7, 0x80, 0x01,
  0xfc, 0x40, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x1c, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpStormSmall = {bitsStormSmall, 80, 20};

const uint8_t bitsRainChance[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x39, 0x01, 0x00, 0x08, 0x0f, 0x17, 0xff, 0xf0, 0x7f,
  0x15, 0x97, 0xca, 0xa0, 0x69, 0x24, 0x9b, 0xcb, 0xc0, 0x7b, 0x24, 0xbe, 0x8f, 0xe0, 0x49, 0x2c,
  0xbf, 0xc3, 0x20, 0x7f, 0x29, 0x9b, 0xdf, 0xf0, 0x49, 0x33, 0x1a, 0x81, 0x00, 0x4b, 0x02, 0x13,
  0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpRainChance = {bitsRainChance, 36, 11};

const uint8_t bitsCold1[] PROGMEM = {
  0x20, 0x00, 0x00, 0x80, 0x00, 0x08, 0x08, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00, 0x63, 0xf0, 0x45,
  0x40, 0x00, 0x18, 0x89, 0x86, 0x10, 0x30, 0xc0, 0x00, 0x00, 0x78, 0x00, 0xc5, 0x4c, 0x00, 0x18,
  0xc9, 0x8f, 0x18, 0x20, 0xc0, 0x00, 0x00, 0xd3, 0xf0, 0xc4, 0x8e, 0x08, 0x10, 0x4b, 0x03, 0xfe,
  0x24, 0xf0, 0x00, 0x00, 0x53, 0x30, 0xc6, 0x03, 0x0c, 0x30, 0x48, 0x02, 0xd2, 0x67, 0xf0, 0x00,
  0x00, 0x32, 0x30, 0xc6, 0x00, 0x18, 0x21, 0xff, 0xc6, 0xd2, 0x60, 0xc0, 0x00, 0x00, 0xff, 0xf0,
  0x86, 0x00, 0x18, 0x60, 0x18, 0x0f, 0xde, 0x60, 0xc0, 0x00, 0x00, 0x33, 0x01, 0x83, 0x00, 0x30,
  0x60, 0x08, 0x0f, 0xfe, 0x70, 0xc0, 0x00, 0x00, 0x3b, 0x21, 0x83, 0x00, 0xe0, 0x41, 0xff, 0xcf,
  0xd2, 0x77, 0xc0, 0x00, 0x00, 0x3d, 0x23, 0x01, 0x83, 0xc0, 0xc0, 0x18, 0x06, 0xd2, 0x74, 0xf3,
  0x00, 0x00, 0x69, 0x63, 0x01, 0x8f, 0x80, 0xc0, 0x08, 0x06, 0xd2, 0x74, 0xf3, 0x80, 0x00, 0x47,
  0xfa, 0x00, 0x0c, 0x01, 0x80, 0x08, 0x06, 0xfe, 0x27, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x08, 0x06, 0xc6, 0x00, 0x00, 0x80, 0x00,
};
const BitmapLabel jpCold1 = {bitsCold1, 98, 13};

const uint8_t bitsCold2[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00,
  0x20, 0x00, 0x08, 0x00, 0xc7, 0x5f, 0x20, 0x03, 0x00, 0x20, 0x00, 0x08, 0x40, 0x86, 0x1f, 0x30,
  0x06, 0x00, 0x20, 0x00, 0x7f, 0x60, 0xc7, 0x86, 0x30, 0x0c, 0x00, 0x3e, 0x00, 0x7b, 0x37, 0xff,
  0x86, 0x38, 0x38, 0x00, 0x3e, 0x00, 0x19, 0x33, 0xc6, 0x0c, 0x3c, 0x30, 0x00, 0x20, 0x00, 0x11,
  0xb0, 0x86, 0x0c, 0x34, 0x70, 0x00, 0x20, 0x00, 0x31, 0x10, 0x9c, 0x08, 0x30, 0x38, 0x00, 0x60,
  0x00, 0x31, 0x00, 0x9c, 0x08, 0x30, 0x1c, 0x03, 0xf8, 0x00, 0x23, 0x00, 0xc0, 0x0c, 0x60, 0x0e,
  0x06, 0x3c, 0x00, 0x6f, 0x00, 0xc1, 0x0f, 0xe0, 0x07, 0x06, 0x66, 0x00, 0x6e, 0x00, 0xff, 0x07,
  0x80, 0x03, 0x83, 0xe2, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
};
const BitmapLabel jpCold2 = {bitsCold2, 65, 14};

const uint8_t bitsHot1[] PROGMEM = {
  0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x3f, 0xe0,
  0x18, 0x18, 0x00, 0x04, 0x00, 0x3f, 0x83, 0xff, 0x18, 0x30, 0x07, 0xc0, 0x0c, 0x83, 0x83, 0x18,
  0x18, 0x07, 0xc0, 0x0f, 0xc0, 0x01, 0x98, 0x18, 0x04, 0x00, 0x3d, 0xe0, 0x01, 0x88, 0x0c, 0x04,
  0x00, 0x3d, 0x30, 0x01, 0x89, 0x0c, 0x0c, 0x00, 0x6f, 0x30, 0x03, 0x0d, 0x8c, 0x7f, 0x00, 0x6e,
  0x30, 0x0e, 0x0d, 0x8c, 0xc7, 0x80, 0x7c, 0x60, 0x7c, 0x07, 0x00, 0xcc, 0xc0, 0x3b, 0xc0, 0x70,
  0x06, 0x00, 0x7c, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpHot1 = {bitsHot1, 52, 13};

const uint8_t bitsHot2[] PROGMEM = {
  0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x20, 0x00, 0x1e,
  0x01, 0x80, 0x00, 0x20, 0x80, 0x00, 0x02, 0x03, 0xfe, 0x00, 0x7f, 0x01, 0x80, 0x7f, 0xf0, 0xc4,
  0x00, 0x73, 0x31, 0xfc, 0x00, 0xc9, 0x83, 0x00, 0x7b, 0xc3, 0xdf, 0x00, 0x7f, 0x60, 0xc0, 0x00,
  0xc8, 0xc3, 0x00, 0x03, 0x10, 0xf3, 0x00, 0x0b, 0xc0, 0xf9, 0x01, 0x98, 0xc3, 0x80, 0x06, 0x78,
  0xe1, 0x00, 0x1b, 0x81, 0xcf, 0x01, 0x98, 0xc7, 0xe0, 0x06, 0x21, 0xc1, 0x80, 0x12, 0xc3, 0x3c,
  0x01, 0x98, 0xc7, 0x62, 0x04, 0x01, 0x81, 0x80, 0x32, 0xc0, 0x78, 0x01, 0xb0, 0xc6, 0x66, 0x06,
  0x03, 0x8f, 0x80, 0x62, 0x60, 0x48, 0x01, 0xf1, 0x8c, 0x66, 0x06, 0x02, 0x9b, 0x80, 0x62, 0x30,
  0xc0, 0x00, 0xef, 0x0c, 0x7c, 0x03, 0xc0, 0x93, 0xc0, 0x4e, 0x10, 0x7f, 0x00, 0x06, 0x0c, 0x38,
  0x01, 0xc0, 0x9e, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
};
const BitmapLabel jpHot2 = {bitsHot2, 82, 13};

const uint8_t bitsMild[] PROGMEM = {
  0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc3, 0x0c, 0x00, 0x00, 0x00,
  0x03, 0x00, 0x0f, 0x07, 0xbf, 0x00, 0x10, 0x0f, 0xe3, 0x18, 0x60, 0x00, 0x18, 0x03, 0x00, 0x3f,
  0x86, 0xa3, 0x3f, 0xf8, 0x1c, 0x73, 0x30, 0x60, 0xc3, 0xff, 0x0f, 0xe0, 0x64, 0xc6, 0xa7, 0x3d,
  0xe0, 0x18, 0x33, 0x70, 0x60, 0x63, 0x83, 0x03, 0xc0, 0x64, 0x67, 0xa0, 0x01, 0x88, 0x18, 0x33,
  0xe0, 0x60, 0x60, 0x01, 0x82, 0x00, 0xcc, 0x66, 0xbf, 0x03, 0x3c, 0x18, 0x33, 0xe0, 0x20, 0x30,
  0x01, 0x9f, 0x58, 0xcc, 0x66, 0xbb, 0x03, 0x10, 0x18, 0x33, 0xe0, 0x24, 0x30, 0x01, 0x8f, 0xd8,
  0xcc, 0x67, 0xbb, 0x02, 0x00, 0x18, 0x33, 0x30, 0x36, 0x30, 0x03, 0x02, 0x08, 0xd8, 0x66, 0xae,
  0x03, 0x00, 0x18, 0x33, 0x38, 0x36, 0x30, 0x0e, 0x02, 0x08, 0xf8, 0xc6, 0xa6, 0x03, 0x00, 0x1c,
  0x63, 0x18, 0x1c, 0x00, 0x7c, 0x03, 0x18, 0x77, 0x84, 0xa6, 0x01, 0xe0, 0x0f, 0xe3, 0x0c, 0x18,
  0x00, 0x70, 0x03, 0xf0, 0x03, 0x0c, 0xbf, 0x00, 0xe0, 0x07, 0xc3, 0x0e, 0x00, 0x00, 0x00, 0x00,
  0x40, 0x00, 0x05, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpMild = {bitsMild, 103, 14};

const uint8_t bitsUmbrella[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x03, 0x80, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x06, 0x03, 0x80, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x03, 0x80, 0x00, 0x70, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x0e, 0x03, 0x80, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x01, 0xc6, 0x00, 0x70,
  0x00, 0x00, 0x00, 0x01, 0xff, 0xfe, 0x0e, 0x01, 0x80, 0x00, 0x00, 0x00, 0x03, 0x81, 0x00, 0x01,
  0xfe, 0x07, 0xf3, 0x00, 0x00, 0x00, 0x03, 0xff, 0xfe, 0x0e, 0x01, 0x80, 0x00, 0x00, 0x00, 0x03,
  0x83, 0x80, 0xff, 0xfe, 0x07, 0xff, 0x00, 0x00, 0x00, 0x03, 0xff, 0xfc, 0x0c, 0x01, 0xf0, 0x00,
  0x00, 0x00, 0x3f, 0xf1, 0xc0, 0xff, 0xe0, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x0c,
  0x7f, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xf9, 0xc0, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00,
  0x07, 0x80, 0x0c, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x37, 0x1c, 0xe0, 0x00, 0x70, 0x00, 0xe0, 0x00,
  0x07, 0xfc, 0x00, 0x07, 0x00, 0x0c, 0x01, 0x80, 0x00, 0x00, 0x00, 0x07, 0x1c, 0xe0, 0x00, 0x30,
  0x0c, 0xe0, 0x20, 0x3f, 0xfe, 0x00, 0x0e, 0x00, 0x0c, 0x01, 0x81, 0xff, 0xff, 0xc0, 0x06, 0x1c,
  0x70, 0x1f, 0xf8, 0x0f, 0xff, 0xe0, 0x3e, 0x07, 0x00, 0x0e, 0x00, 0x1c, 0x01, 0x81, 0xff, 0xff,
  0xc0, 0x0e, 0x1c, 0x70, 0x7f, 0xfc, 0x07, 0xff, 0x70, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x1d, 0x01,
  0x80, 0xff, 0xff, 0x80, 0x0e, 0x1c, 0x70, 0x78, 0x7c, 0x00, 0xe0, 0x30, 0x00, 0x03, 0x00, 0x1c,
  0x00, 0x0d, 0x81, 0x80, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x20, 0xe0, 0x18, 0x00, 0xc0, 0x30, 0x00,
  0x03, 0x00, 0x1c, 0x00, 0x0f, 0x83, 0x80, 0x00, 0x00, 0x00, 0x1c, 0x18, 0x00, 0xe0, 0x00, 0x00,
  0xc0, 0x30, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x0f, 0x03, 0x80, 0x00, 0x00, 0x00, 0x1c, 0x18, 0x00,
  0xe0, 0x00, 0x00, 0xe0, 0x70, 0x00, 0x0f, 0x00, 0x0f, 0x00, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00,
  0x38, 0x38, 0x00, 0xe0, 0x08, 0x00, 0xf0, 0xf0, 0x00, 0x1e, 0x00, 0x07, 0xe0, 0x0e, 0x0f, 0x00,
  0x00, 0x00, 0x00, 0x3b, 0xf8, 0x00, 0x7f, 0xfc, 0x00, 0x7f, 0xe0, 0x03, 0xfc, 0x00, 0x03, 0xf0,
  0x0e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x73, 0xf0, 0x00, 0x7f, 0xfc, 0x00, 0x3f, 0xc0, 0x03, 0xf0,
  0x00, 0x01, 0xf0, 0x0e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x1f, 0xe0, 0x00, 0x00,
  0x00, 0x03, 0x80, 0x00, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpUmbrella = {bitsUmbrella, 147, 21};

const uint8_t bitsNoUmbrella[] PROGMEM = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x03, 0x80, 0x07, 0x01, 0xc0, 0x00, 0x00,
  0x00, 0x00, 0x30, 0x00, 0x03, 0x80, 0x00, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x03, 0x80, 0x00, 0x03,
  0x80, 0x07, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x03, 0x80, 0x00, 0x3f, 0xf8, 0x00,
  0xff, 0x80, 0x03, 0x80, 0x00, 0x01, 0xc6, 0x07, 0x01, 0xc0, 0x00, 0xe0, 0x00, 0x00, 0x3f, 0xc0,
  0x03, 0x80, 0x00, 0x3f, 0xf8, 0x01, 0xff, 0x80, 0x03, 0x81, 0x00, 0x01, 0xfe, 0x06, 0x01, 0xc0,
  0x00, 0xe0, 0x0c, 0x00, 0x0f, 0xc0, 0x03, 0xf7, 0x00, 0x20, 0xf0, 0x00, 0x1f, 0x80, 0x03, 0x83,
  0x80, 0xff, 0xfe, 0x06, 0x01, 0xf8, 0x00, 0xe0, 0x1c, 0x01, 0xc0, 0x80, 0x3f, 0xf7, 0xc0, 0x01,
  0xe0, 0x00, 0x00, 0x00, 0x3f, 0xf1, 0xc0, 0xff, 0xe0, 0x0e, 0x7f, 0xf8, 0x00, 0xe0, 0x0e, 0x01,
  0xc0, 0x00, 0x3f, 0xe3, 0xf0, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x7f, 0xf9, 0xc0, 0x00, 0xe0, 0x0e,
  0x3f, 0xf0, 0x00, 0xe0, 0x0e, 0x01, 0xc0, 0x00, 0x07, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xff, 0x80,
  0x37, 0x1c, 0xe0, 0x00, 0x70, 0x0e, 0x01, 0xc0, 0x00, 0xe0, 0x07, 0x01, 0x80, 0x00, 0x06, 0x06,
  0x20, 0x0e, 0x07, 0x07, 0xff, 0xc0, 0x07, 0x1c, 0xe0, 0x00, 0x30, 0x0e, 0x01, 0xc0, 0x00, 0xe0,
  0x07, 0x01, 0x8f, 0xc0, 0x0e, 0x06, 0x00, 0x7f, 0xff, 0x07, 0xff, 0xe0, 0x06, 0x1c, 0x70, 0x1f,
  0xf8, 0x0e, 0x01, 0xc0, 0x00, 0x60, 0x03, 0x81, 0xbf, 0xf0, 0x0e, 0x06, 0x03, 0xff, 0xff, 0x06,
  0x00, 0xf0, 0x0e, 0x1c, 0x70, 0x7f, 0xfc, 0x0e, 0x81, 0xc0, 0x00, 0x61, 0x03, 0x83, 0xfc, 0xf8,
  0x1c, 0x06, 0x03, 0xf9, 0xe0, 0x00, 0x00, 0x70, 0x0e, 0x1c, 0x70, 0x78, 0x7c, 0x0f, 0x9f, 0xc0,
  0x00, 0x61, 0x83, 0x83, 0xe0, 0x38, 0x1c, 0x06, 0x00, 0x03, 0x80, 0x00, 0x00, 0x70, 0x0c, 0x1c,
  0x20, 0xe0, 0x18, 0x0f, 0xbf, 0xe0, 0x00, 0x73, 0x81, 0x83, 0x80, 0x38, 0x38, 0xff, 0x00, 0x07,
  0x00, 0x00, 0x00, 0x70, 0x1c, 0x18, 0x00, 0xe0, 0x00, 0x0f, 0x79, 0xf8, 0x00, 0x73, 0x81, 0xc0,
  0x00, 0x38, 0x39, 0xff, 0x80, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x18, 0x00, 0xe0, 0x00, 0x0f,
  0x71, 0xfc, 0x00, 0x7b, 0x01, 0xc0, 0x00, 0x38, 0x71, 0xc7, 0xe0, 0x0e, 0x00, 0x00, 0x01, 0xe0,
  0x38, 0x38, 0x00, 0xe0, 0x08, 0x0f, 0x71, 0xd8, 0x00, 0x3f, 0x01, 0x00, 0xc0, 0xf0, 0x33, 0x87,
  0xf0, 0x07, 0x00, 0x00, 0x0f, 0xc0, 0x3b, 0xf8, 0x00, 0x7f, 0xfc, 0x06, 0x3f, 0xc8, 0x00, 0x3e,
  0x00, 0x00, 0xff, 0xf0, 0x01, 0xce, 0x60, 0x07, 0xf8, 0x00, 0xff, 0x80, 0x73, 0xf0, 0x00, 0x7f,
  0xfc, 0x06, 0x1f, 0x80, 0x00, 0x1c, 0x00, 0x00, 0xff, 0xc0, 0x01, 0xfe, 0x20, 0x03, 0xf8, 0x00,
  0x7e, 0x00, 0x10, 0x40, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0xfc, 0x00, 0x00, 0xf8, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpNoUmbrella = {bitsNoUmbrella, 175, 21};

const uint8_t bitsUnknown[] PROGMEM = {
  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, 0x03, 0x80, 0x00, 0x06, 0x00, 0x1c,
  0x06, 0x00, 0x00, 0x0e, 0x00, 0x06, 0x01, 0x80, 0xc0, 0x00, 0x07, 0x00, 0x00, 0x60, 0x00, 0x07,
  0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x00, 0x1c, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x06,
  0x0d, 0x80, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x7e, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
  0x00, 0x07, 0x18, 0x18, 0x06, 0x00, 0x00, 0x0e, 0x30, 0x0e, 0x06, 0xc0, 0xc0, 0x00, 0x06, 0x00,
  0x00, 0x3f, 0x80, 0x06, 0x4c, 0x07, 0x00, 0x00, 0x03, 0x03, 0x00, 0x07, 0xf8, 0x18, 0x06, 0xc0,
  0x07, 0xff, 0xf8, 0x0e, 0xc6, 0x07, 0xe0, 0x00, 0x06, 0x06, 0x00, 0x0f, 0x80, 0x7f, 0xdf, 0x07,
  0x00, 0xc0, 0x1f, 0xe3, 0x83, 0xff, 0xf8, 0x39, 0xff, 0xc0, 0x03, 0xff, 0xe0, 0x7f, 0xc0, 0x0f,
  0xe7, 0xc0, 0x3f, 0xc7, 0x01, 0xc0, 0x00, 0x7f, 0xcf, 0xc7, 0x00, 0xe0, 0x7f, 0xf1, 0x81, 0xff,
  0x80, 0x39, 0xff, 0xc0, 0x00, 0x0e, 0x00, 0x7f, 0xc0, 0x07, 0xdf, 0xf0, 0xff, 0xe3, 0x01, 0x80,
  0x00, 0x0c, 0x03, 0xc7, 0x00, 0xe0, 0x7f, 0x39, 0xc0, 0x01, 0xc0, 0x38, 0x06, 0x00, 0x00, 0x0e,
  0x30, 0x0c, 0x00, 0x01, 0xfe, 0x78, 0xfe, 0x73, 0x81, 0x80, 0x00, 0x1c, 0x08, 0x87, 0x00, 0x70,
  0x06, 0x38, 0xc0, 0x01, 0xc0, 0x38, 0x06, 0x00, 0x03, 0xff, 0xf0, 0x0c, 0x7f, 0x81, 0xf0, 0x38,
  0x0c, 0x71, 0x81, 0x80, 0x00, 0x1c, 0x1c, 0x07, 0x00, 0x70, 0x0e, 0x18, 0xe0, 0x00, 0xe0, 0x38,
  0x06, 0x00, 0x03, 0xff, 0xe0, 0x1c, 0x7f, 0x81, 0xe0, 0x18, 0x1c, 0x31, 0xc3, 0x9f, 0xc0, 0x18,
  0x1c, 0x07, 0x00, 0x38, 0x0e, 0x18, 0xe0, 0x3f, 0xe0, 0x30, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x1c,
  0x40, 0x01, 0xc0, 0x18, 0x1c, 0x31, 0xc3, 0xff, 0xe0, 0x38, 0x1c, 0x07, 0x00, 0x38, 0x0c, 0x18,
  0x60, 0xff, 0xf0, 0x34, 0x06, 0x00, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x03, 0xc0, 0x1c, 0x18, 0x30,
  0xc3, 0xf0, 0xf0, 0x38, 0x1c, 0x03, 0x18, 0x18, 0x1c, 0x38, 0x41, 0xe0, 0xf0, 0x3e, 0x7e, 0x00,
  0x00, 0xfe, 0x00, 0x38, 0xc0, 0x07, 0xc0, 0x18, 0x38, 0x70, 0x83, 0xc0, 0x70, 0x71, 0xfc, 0x03,
  0x1c, 0x18, 0x1c, 0x38, 0x01, 0xc0, 0x00, 0x3c, 0xff, 0x80, 0x01, 0xff, 0x80, 0x38, 0xc0, 0x0f,
  0xc0, 0x38, 0x38, 0x70, 0x03, 0x80, 0x30, 0x73, 0xfe, 0x03, 0x98, 0x1c, 0x18, 0x38, 0x01, 0x80,
  0x00, 0x3d, 0xc7, 0xc0, 0x03, 0x8f, 0xe0, 0x31, 0xc0, 0x0d, 0xc0, 0x38, 0x30, 0x70, 0x00, 0x00,
  0x70, 0xe7, 0x1f, 0x83, 0xb8, 0x1c, 0x3a, 0x30, 0x01, 0xc0, 0x00, 0x3d, 0x87, 0xe0, 0x03, 0x0e,
  0xf0, 0x71, 0xc0, 0x81, 0xdc, 0xf0, 0x74, 0x60, 0x00, 0x00, 0x70, 0x67, 0x1f, 0xc1, 0xf0, 0x10,
  0x33, 0xf0, 0x01, 0xf1, 0xf0, 0x39, 0xce, 0xc0, 0x03, 0x8e, 0x78, 0x70, 0xff, 0x81, 0xcf, 0xe0,
  0x67, 0xe0, 0x00, 0xe3, 0xe0, 0x07, 0x1d, 0x81, 0xf0, 0x00, 0x73, 0xe0, 0x00, 0xff, 0xf0, 0x38,
  0xfe, 0x00, 0x03, 0xfc, 0x10, 0x60, 0x7f, 0x81, 0xcf, 0xc0, 0xe7, 0xc0, 0x00, 0xff, 0xc0, 0x03,
  0xf8, 0x80, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x18, 0x7c, 0x00, 0x00, 0xf8, 0x00, 0x20,
  0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x01, 0xf0, 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,
};
const BitmapLabel jpUnknown = {bitsUnknown, 207, 20};

const uint8_t bitsWait[] PROGMEM = {
  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, 0x03, 0x00, 0x00, 0x00, 0x00,
  0x0e, 0x00, 0x00, 0xe0, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x03, 0x02, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x61, 0x80,
  0x18, 0xe0, 0x00, 0x60, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x20, 0x00, 0x0e, 0x07, 0xfe, 0x00, 0x0e,
  0x00, 0x03, 0x27, 0x07, 0xff, 0xf0, 0x0c, 0x00, 0x00, 0xff, 0x83, 0xff, 0xe0, 0x00, 0x60, 0x00,
  0x01, 0xf8, 0x00, 0x00, 0xb0, 0xff, 0xfe, 0x07, 0xfe, 0x00, 0x0e, 0x00, 0x3f, 0xf7, 0x8f, 0xff,
  0xf0, 0x1c, 0x00, 0x0f, 0xff, 0x03, 0xff, 0x80, 0x00, 0x60, 0x00, 0x0c, 0x38, 0x00, 0x70, 0xd9,
  0xff, 0xfe, 0x00, 0x3c, 0x00, 0x0e, 0x10, 0x3f, 0xc3, 0x86, 0x07, 0x80, 0x1c, 0x00, 0x0f, 0xf0,
  0x00, 0x70, 0x00, 0x00, 0x60, 0x00, 0x0c, 0x00, 0x00, 0xf8, 0xc0, 0xc0, 0xf0, 0x00, 0x78, 0x00,
  0x0f, 0xf0, 0x03, 0x01, 0xc0, 0x0e, 0x00, 0x18, 0x00, 0x00, 0x3b, 0x80, 0xee, 0x00, 0x00, 0x60,
  0x00, 0x0c, 0x00, 0x01, 0xfc, 0x40, 0x01, 0xc0, 0x00, 0xf0, 0x00, 0x0f, 0xf0, 0x03, 0x00, 0x80,
  0x1c, 0x00, 0x38, 0x00, 0x0f, 0xff, 0xc0, 0xff, 0x38, 0x00, 0x60, 0x00, 0x1c, 0x00, 0x01, 0xce,
  0x00, 0x03, 0x80, 0x01, 0xc0, 0x00, 0x0e, 0x00, 0x03, 0xfc, 0x00, 0x38, 0x00, 0x3f, 0x00, 0x1f,
  0xfe, 0x01, 0xe7, 0xf8, 0x00, 0x60, 0x00, 0x1c, 0xfc, 0x03, 0x8f, 0x00, 0x07, 0x00, 0x03, 0xfe,
  0x00, 0x0e, 0x00, 0x07, 0xff, 0x00, 0x38, 0x00, 0x3f, 0x80, 0x0f, 0x8c, 0x03, 0xc7, 0xe0, 0x00,
  0x60, 0x18, 0x1f, 0xfe, 0x07, 0x07, 0x80, 0x07, 0x00, 0x07, 0xff, 0x80, 0x0e, 0x00, 0x1f, 0x87,
  0x00, 0x30, 0x00, 0x7f, 0x82, 0x00, 0x0e, 0x03, 0x8f, 0x80, 0x00, 0x60, 0x1c, 0x1f, 0x87, 0x0e,
  0x03, 0xc0, 0x06, 0x00, 0x0f, 0x83, 0x80, 0x0e, 0x00, 0x3f, 0x03, 0x80, 0x30, 0x00, 0x71, 0x87,
  0x03, 0xff, 0x01, 0x3f, 0x00, 0x00, 0x60, 0x1c, 0x1e, 0x03, 0x0e, 0x01, 0xe0, 0x06, 0x00, 0x1c,
  0x01, 0xc0, 0xfe, 0x00, 0x3f, 0x21, 0x80, 0x30, 0x00, 0x71, 0x87, 0x07, 0xff, 0x00, 0x3b, 0x00,
  0x00, 0x60, 0x18, 0x18, 0x03, 0x84, 0x00, 0xf0, 0x06, 0x00, 0x19, 0xe1, 0xc1, 0xff, 0x80, 0x73,
  0x71, 0x80, 0x38, 0x00, 0xe1, 0x86, 0x0e, 0x02, 0x00, 0x73, 0x00, 0x00, 0x60, 0x38, 0x00, 0x03,
  0x00, 0x00, 0x78, 0x07, 0x00, 0x03, 0xf1, 0xc3, 0x8f, 0xe0, 0x73, 0x71, 0x80, 0x1e, 0x00, 0xe1,
  0xc6, 0x0c, 0x00, 0x00, 0x71, 0x00, 0x00, 0x70, 0x70, 0x00, 0x07, 0x00, 0x00, 0x38, 0x03, 0xc0,
  0x03, 0x39, 0x83, 0x8e, 0xf0, 0x3f, 0x33, 0x80, 0x1f, 0xc0, 0xc1, 0xde, 0x0e, 0x07, 0x00, 0x70,
  0x30, 0x00, 0x79, 0xf0, 0x0e, 0x1f, 0x00, 0x00, 0x18, 0x03, 0xf8, 0x03, 0x9f, 0x83, 0x8e, 0x78,
  0x3f, 0x3f, 0x00, 0x07, 0xc1, 0xc0, 0xfc, 0x07, 0xff, 0x00, 0x3f, 0xf0, 0x00, 0x3f, 0xe0, 0x07,
  0xfe, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0xff, 0x01, 0xfc, 0x30, 0x0e, 0x1e, 0x00, 0x00, 0x81,
  0xc0, 0x78, 0x03, 0xfe, 0x00, 0x1f, 0xf0, 0x00, 0x1f, 0x80, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00,
  0x10, 0x00, 0xfc, 0x00, 0xf8, 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,
};
const BitmapLabel jpWait = {bitsWait, 215, 19};

const uint8_t bitsError[] PROGMEM = {
  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, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
  0x00, 0x0e, 0x00, 0x00, 0xe0, 0x00, 0x30, 0x58, 0x00, 0x18, 0x00, 0x0e, 0x00, 0x00, 0x60, 0x00,
  0x0c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0xc0, 0x00, 0x03, 0x02, 0x00, 0x00, 0x70, 0x0e,
  0x00, 0x00, 0x61, 0x80, 0x70, 0x6c, 0x00, 0x18, 0x00, 0x0e, 0x00, 0x00, 0xe0, 0x00, 0x0c, 0x00,
  0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0xc0, 0x00, 0x03, 0x27, 0x07, 0xff, 0xf0, 0x0c, 0x00, 0x00,
  0xff, 0x80, 0x70, 0x20, 0x00, 0x1c, 0x00, 0x0e, 0x00, 0x00, 0xe1, 0x80, 0x1c, 0x00, 0x00, 0x00,
  0x00, 0x70, 0x00, 0x01, 0xc0, 0x00, 0x3f, 0xf7, 0x8f, 0xff, 0xf0, 0x1c, 0x00, 0x0f, 0xff, 0x00,
  0x70, 0x20, 0x00, 0x1c, 0x00, 0x7e, 0x3e, 0x07, 0xfd, 0xe0, 0x1c, 0x18, 0x00, 0x00, 0x03, 0xfe,
  0x00, 0x01, 0xc2, 0x00, 0x3f, 0xc3, 0x86, 0x07, 0x80, 0x1c, 0x00, 0x0f, 0xf0, 0x03, 0xfe, 0x10,
  0x00, 0x0c, 0x30, 0x7e, 0x7e, 0x07, 0xf8, 0xf8, 0xff, 0x9c, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x01,
  0xfe, 0x00, 0x03, 0x01, 0xc0, 0x0e, 0x00, 0x18, 0x00, 0x00, 0x3b, 0x87, 0xff, 0x30, 0x00, 0x0f,
  0xf8, 0x0d, 0xe6, 0x01, 0xc0, 0x39, 0xff, 0xcc, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x01, 0xfe, 0x00,
  0x03, 0x00, 0x80, 0x1c, 0x00, 0x38, 0x00, 0x0f, 0xff, 0xc7, 0xe7, 0x38, 0x00, 0x0f, 0xf0, 0x0f,
  0x86, 0x01, 0x81, 0x81, 0xf8, 0xce, 0x01, 0xfc, 0x00, 0xe3, 0xf8, 0x01, 0xc0, 0x00, 0x03, 0xfc,
  0x00, 0x38, 0x00, 0x3f, 0x00, 0x1f, 0xfe, 0x00, 0xe3, 0x18, 0x00, 0x1f, 0x80, 0x0f, 0x06, 0x01,
  0x81, 0x80, 0x38, 0xc6, 0x0f, 0xff, 0x00, 0xe7, 0xf8, 0x01, 0xc0, 0x00, 0x07, 0xff, 0x00, 0x38,
  0x00, 0x3f, 0x80, 0x0f, 0x8c, 0x00, 0xc3, 0x1c, 0x00, 0x3c, 0x00, 0x0e, 0x0e, 0x03, 0x81, 0x80,
  0x38, 0xc7, 0x0f, 0x07, 0x00, 0xc0, 0x00, 0x01, 0xc0, 0x00, 0x1f, 0x87, 0x00, 0x30, 0x00, 0x7f,
  0x82, 0x00, 0x0e, 0x00, 0xc3, 0x1c, 0x00, 0x70, 0x00, 0x1c, 0x0e, 0x03, 0x01, 0x80, 0x30, 0xc3,
  0x00, 0x03, 0x80, 0xc0, 0x00, 0x01, 0xc0, 0x00, 0x3f, 0x03, 0x80, 0x30, 0x00, 0x71, 0x87, 0x03,
  0xff, 0x01, 0xc3, 0x0c, 0x00, 0xe0, 0x00, 0x3c, 0x0c, 0x07, 0x1f, 0x80, 0x70, 0xc3, 0x00, 0x03,
  0x81, 0xc6, 0x00, 0x1f, 0xc0, 0x00, 0x3f, 0x21, 0x80, 0x30, 0x00, 0x71, 0x87, 0x07, 0xff, 0x01,
  0xc3, 0x08, 0x00, 0xe0, 0x00, 0x7c, 0x0c, 0x47, 0x3f, 0xc0, 0x70, 0xc0, 0x00, 0x03, 0x81, 0xce,
  0x00, 0x3f, 0xf0, 0x00, 0x73, 0x71, 0x80, 0x38, 0x00, 0xe1, 0x86, 0x0e, 0x02, 0x01, 0x83, 0x00,
  0x00, 0xe0, 0x00, 0x6c, 0x0c, 0xce, 0x71, 0xf0, 0x60, 0xc0, 0x00, 0x03, 0x01, 0x8c, 0x00, 0x71,
  0xfc, 0x00, 0x73, 0x71, 0x80, 0x1e, 0x00, 0xe1, 0xc6, 0x0c, 0x00, 0x03, 0x87, 0x00, 0x00, 0xf0,
  0x08, 0x4c, 0x0c, 0xc6, 0x61, 0xf8, 0xe9, 0xc0, 0x00, 0x0f, 0x03, 0x8e, 0x08, 0x71, 0xde, 0x00,
  0x3f, 0x33, 0x80, 0x1f, 0xc0, 0xc1, 0xde, 0x0e, 0x07, 0x03, 0x27, 0x00, 0x00, 0x7f, 0xf8, 0x0c,
  0x0f, 0xc0, 0x73, 0xb9, 0xcf, 0x80, 0x00, 0x7e, 0x03, 0x8f, 0xfc, 0x71, 0xcf, 0x00, 0x3f, 0x3f,
  0x00, 0x07, 0xc1, 0xc0, 0xfc, 0x07, 0xff, 0x07, 0x3e, 0x00, 0x00, 0x3f, 0xf8, 0x0c, 0x0f, 0x80,
  0x7f, 0x11, 0xcf, 0x80, 0x01, 0xfc, 0x03, 0x03, 0xf8, 0x3f, 0x86, 0x00, 0x0e, 0x1e, 0x00, 0x00,
  0x81, 0xc0, 0x78, 0x03, 0xfe, 0x03, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1e, 0x00,
  0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x1f, 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,
};
const BitmapLabel jpError = {bitsError, 234, 20};

const uint8_t bitsOff[] PROGMEM = {
  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, 0x40, 0x00, 0x00, 0x00, 0x03,
  0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1f, 0xfc,
  0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x18, 0xe0, 0x01, 0x80, 0x00, 0x0e, 0x00, 0x00,
  0x00, 0x70, 0x38, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0x03, 0xff,
  0xe0, 0x01, 0xc0, 0x20, 0x0e, 0x00, 0x07, 0xff, 0xf0, 0x38, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x03,
  0xc0, 0x00, 0x00, 0x0f, 0xf8, 0x03, 0xff, 0x80, 0x01, 0xc0, 0x60, 0x7e, 0x3e, 0x0f, 0xff, 0xf1,
  0xf8, 0xf8, 0x00, 0x00, 0x1c, 0x00, 0x07, 0x80, 0x07, 0x08, 0x00, 0x30, 0x00, 0x70, 0x00, 0x01,
  0xc0, 0x70, 0x7e, 0x7e, 0x06, 0x07, 0x81, 0xfb, 0xfc, 0x00, 0x00, 0x1c, 0x00, 0x1f, 0x00, 0x73,
  0x1c, 0x00, 0x30, 0x00, 0xee, 0x00, 0x01, 0xc0, 0x38, 0x0d, 0xe6, 0x00, 0x0e, 0x00, 0x37, 0x9c,
  0x00, 0x00, 0x38, 0x00, 0x3e, 0x00, 0x33, 0x1c, 0x00, 0x30, 0x00, 0xff, 0x38, 0x01, 0xc0, 0x38,
  0x0f, 0x86, 0x00, 0x1c, 0x00, 0x3e, 0x0e, 0x00, 0x00, 0x70, 0x01, 0xfe, 0x00, 0x33, 0x98, 0x1f,
  0xff, 0xe1, 0xe7, 0xf8, 0x01, 0xc0, 0x1c, 0x0f, 0x06, 0x00, 0x38, 0x00, 0x3c, 0x0e, 0x00, 0x00,
  0x70, 0x07, 0xee, 0x00, 0x39, 0x98, 0x1f, 0xff, 0xe3, 0xc7, 0xe0, 0x01, 0xc0, 0x1c, 0x0e, 0x0e,
  0x00, 0x38, 0x00, 0x38, 0x06, 0x00, 0x00, 0xf0, 0x0f, 0x8e, 0x00, 0x10, 0x38, 0x00, 0x70, 0x03,
  0x8f, 0x80, 0x01, 0xc4, 0x0c, 0x1c, 0x0e, 0x00, 0x30, 0x00, 0x70, 0x06, 0x00, 0x01, 0xf8, 0x06,
  0x0e, 0x00, 0x00, 0x30, 0x00, 0x70, 0x01, 0x3f, 0x00, 0x00, 0xc6, 0x0c, 0x3c, 0x0c, 0x00, 0x30,
  0x00, 0xf0, 0x06, 0x00, 0x03, 0x9e, 0x00, 0x0e, 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x3b, 0x00,
  0x00, 0xce, 0x0e, 0x7c, 0x0c, 0x40, 0x30, 0x01, 0xf0, 0xfe, 0x00, 0x07, 0x0f, 0x00, 0x0e, 0x00,
  0x00, 0xe0, 0x00, 0xe0, 0x00, 0x73, 0x00, 0x00, 0xee, 0x0e, 0x6c, 0x0c, 0xc0, 0x38, 0x01, 0xb1,
  0xfe, 0x00, 0x1e, 0x07, 0x80, 0x0e, 0x00, 0x01, 0xc0, 0x01, 0xe0, 0x00, 0x71, 0x00, 0x00, 0xfc,
  0x0c, 0x4c, 0x0c, 0xc0, 0x1e, 0x01, 0x33, 0x8f, 0x00, 0x3c, 0x03, 0xc0, 0x0e, 0x00, 0x07, 0x80,
  0x03, 0xc0, 0x00, 0x70, 0x30, 0x00, 0x7c, 0x00, 0x0c, 0x0f, 0xc0, 0x1f, 0xc0, 0x33, 0x9f, 0x00,
  0x38, 0x01, 0x80, 0x0e, 0x00, 0x0f, 0x00, 0x0f, 0x80, 0x00, 0x3f, 0xf0, 0x00, 0x38, 0x00, 0x0c,
  0x0f, 0x80, 0x07, 0xc0, 0x31, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x07, 0x00,
  0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x80, 0x30, 0xf0, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00,
};
const BitmapLabel jpOff = {bitsOff, 177, 19};

まとめ

電池スイッチをONすると動き、天気データを取得して表示する、電子工作のデバイスをつくりました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?