#author("2017-01-30T11:53:05+09:00","default:nari","nari")
#author("2017-01-31T11:39:12+09:00","default:nari","nari")
[[FrontPage]]

#ref(./170128b0.jpg,around,right,25%)

* ESP8266 Weather Station Color インストール方法 [#qd23fe61]

** ESP8266 Weather Station Colorの概要 [#uaba652b]

- スイスの [[Daniel Eichhorn:https://blog.squix.org/about-me]]氏が公開されているプログラム
- wundergroundから気象情報を取得し、天気、気温、3日分の天気予報、月齢などを表示
- ESP8266 + ILI9341を使用した小型液晶 という構成で動作
-- 元記事: [[ESP8266 Weather Station Color code published | Squix - TechBlog:https://blog.squix.org/2016/10/esp8266-weather-station-color-code-published.html]]

** 入手先 [#j51ff2ea]

- githubからダウンロードしてください
-- [[squix78/esp8266-weather-station-color: ESP8266 Weather Station in Color using ILI9341 TFT 240x320 display:https://github.com/squix78/esp8266-weather-station-color]]

** ライブラリのインストール [#p22057e7]

- 以下の3つのライブラリでインストールされていないものがあればインストールする
-- [[squix78/esp8266-weather-station:https://github.com/squix78/esp8266-weather-station]]
-- [[adafruit/Adafruit_ILI9341:https://github.com/adafruit/Adafruit_ILI9341]]
-- [[adafruit/Adafruit-GFX-Library:https://github.com/adafruit/Adafruit-GFX-Library]]
-- Arduino IDEの「メニュー スケッチ/ライブラリをインクルード/ライブラリを管理」でインストールしても可

** Wunderground API keyの入手 [#s9a21749]

- [[Wunderground API keyの入手方法]]
- このプログラムを動作させるにはWunderground のAPI Keyが必要です。
-- [[Wunderground API keyの入手方法]]

** プログラムの修正 [#tce53685]

- 自分の環境に合わせて、settings.h を修正します。

*** 端子の設定 [#i1e8a371]

- HSES-LCD24用に端子情報を設定します。
- settings.h 25,26行
 #define TFT_DC 15
 #define TFT_CS 2

*** TimeZonoの設定 [#u7e150a6]

- settings.h  29行
 const float UTC_OFFSET = 9;

*** Wundergroundの設定 [#x97c50ba]

- settings.h 32-36行
 const boolean IS_METRIC = true;
 const String WUNDERGRROUND_API_KEY = "<前項で取得したWundergroundのAPI key";
 const String WUNDERGRROUND_LANGUAGE = "EN";
 const String WUNDERGROUND_COUNTRY = "JP";
 const String WUNDERGROUND_CITY = "<天候を表示させたい都市名>";

- どの都市名が使用できるかは、[[wunderground:https://www.wunderground.com/]]の検索box/Search Locationsで検索してみるとわかります。

** WiFi ManagerでWiFiの設定を入力 [#y795870d]

- このプログラムは WiFi Managerを使用しており、無線LANのssidとパスワードをROMの専用領域に保存し使用するようになっています。
- これらの情報が未設定あるいは接続できない場合、プログラムはWiFiアクセスポイントとして動作し、スマホ、ノートパソコン等で接続、ブラウザでssidとパスワードを入力します。

- 参考:
-- [[ESP8266 Wi-Fi SSID、パスワードのオンライン設定 - IoTラボ:http://takehikoshimojima.tumblr.com/post/138820924644/esp8266-wi-fi-ssid%E3%83%91%E3%82%B9%E3%83%AF%E3%83%BC%E3%83%89%E3%81%AE%E3%82%AA%E3%83%B3%E3%83%A9%E3%82%A4%E3%83%B3%E8%A8%AD%E5%AE%9A]]
-- [[ESP8266 がアクセスポイントとなってSSID・パスワードの初期設定をする - Qiita:http://qiita.com/hotchpotch/items/eec0260b8b1938dda696]]



トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS