/*
2019年6月13日13:47:26
by 零知实验室
*/
#include
#include
#include
// time
#include // time() ctime()
#include // struct timeval
#include // settimeofday_cb()
#include "SSD1306Wire.h"
#include "OLEDDisplayUi.h"
#include "Wire.h"
#include "OpenWeatherMapCurrent.h"
#include "OpenWeatherMapForecast.h"
#include "WeatherStationFonts.h"
#include "WeatherStationImages.h"
/***************************
* Begin Settings
**************************/
// WIFI
const char* WIFI_SSID = "xx";
const char* WIFI_PWD = "xx";
#define TZ 8 // (utc+) TZ in hours
#define DST_MN 60 // use 60mn for summer time in some countries
// Setup
const int UPDATE_INTERVAL_SECS = 20 * 60; // Update every 20 minutes
// Display Settings
const int I2C_DISPLAY_ADDRESS = 0x3c;
const int SDA_PIN = D3;
const int SDC_PIN = D4;
// OpenWeatherMap Settings
// Sign up here to get an API key:
// [url=https://docs.thingpulse.com/how-tos/openweathermap-key/]https://docs.thingpulse.com/how-tos/openweathermap-key/[/url]
String OPEN_WEATHER_MAP_APP_ID = "xxx"; //你的API KEY
/*
Go to [url=https://openweathermap.org/find?q=]https://openweathermap.org/find?q=[/url] and search for a location. Go through the
result set and select the entry closest to the actual location you want to display
data for. It'll be a URL like [url=https://openweathermap.org/city/2657896.]https://openweathermap.org/city/2657896.[/url] The number
at the end is what you assign to the constant below.
*/
String OPEN_WEATHER_MAP_LOCATION_ID = "1795565"; //city:深圳
// Pick a language code from this list:
// Arabic - ar, Bulgarian - bg, Catalan - ca, Czech - cz, German - de, Greek - el,
// English - en, Persian (Farsi) - fa, Finnish - fi, French - fr, Galician - gl,
// Croatian - hr, Hungarian - hu, Italian - it, Japanese - ja, Korean - kr,
// Latvian - la, Lithuanian - lt, Macedonian - mk, Dutch - nl, Polish - pl,
// Portuguese - pt, Romanian - ro, Russian - ru, Swedish - se, Slovak - sk,