Skip to content

Commit ce4b6fb

Browse files
authored
Merge pull request G6EJD#165 from skiphansen/build_fixes
Example build fixes
2 parents 909fca5 + f5927b7 commit ce4b6fb

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Change to your WiFi credentials
2+
const char* ssid = "your_SSID"; // WiFi SSID to connect to
3+
const char* password = "your_PASSWORD"; // WiFi password needed for the SSID
4+
5+
// Use your own API key by signing up for a free developer account at https://openweathermap.org/
6+
String apikey = "your_API_key"; // See: https://openweathermap.org/ // It's free to get an API key, but don't take more than 60 readings/minute!
7+
const char server[] = "api.openweathermap.org";
8+
//http://api.openweathermap.org/data/2.5/weather?q=Melksham,UK&APPID=your_OWM_API_key&mode=json&units=metric&cnt=1 // Example API call for weather data
9+
//http://api.openweathermap.org/data/2.5/forecast?q=Melksham,UK&APPID=your_OWM_API_key&mode=json&units=metric&cnt=40 // Example API call for forecast data
10+
//Set your location according to OWM locations
11+
12+
String City = "MELKSHAM"; // Your home city See: http://bulk.openweathermap.org/sample/
13+
String Country = "GB"; // Your _ISO-3166-1_two-letter_country_code country code, on OWM find your nearest city and the country code is displayed
14+
// https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
15+
String Language = "EN"; // NOTE: Only the weather description is translated by OWM
16+
// Examples: Arabic (AR) Czech (CZ) English (EN) Greek (EL) Persian(Farsi) (FA) Galician (GL) Hungarian (HU) Japanese (JA)
17+
// Korean (KR) Latvian (LA) Lithuanian (LT) Macedonian (MK) Slovak (SK) Slovenian (SL) Vietnamese (VI)
18+
String Hemisphere = "north"; // or "south"
19+
String Units = "M"; // Use 'M' for Metric or I for Imperial
20+
const char* Timezone = "GMT0BST,M3.5.0/01,M10.5.0/02"; // Choose your time zone from: https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv
21+
// See below for examples
22+
const char* ntpServer = "0.uk.pool.ntp.org"; // Or, choose a time server close to you, but in most cases it's best to use pool.ntp.org to find an NTP server
23+
// then the NTP system decides e.g. 0.pool.ntp.org, 1.pool.ntp.org as the NTP syem tries to find the closest available servers
24+
// EU "0.europe.pool.ntp.org"
25+
// US "0.north-america.pool.ntp.org"
26+
// See: https://www.ntppool.org/en/
27+
int gmtOffset_sec = 0; // UK normal time is GMT, so GMT Offset is 0, for US (-5Hrs) is typically -18000, AU is typically (+8hrs) 28800
28+
int daylightOffset_sec = 3600; // In the UK DST is +1hr or 3600-secs, other countries may use 2hrs 7200 or 30-mins 1800 or 5.5hrs 19800 Ahead of GMT use + offset behind - offset
29+
30+
// Example time zones
31+
//const char* Timezone = "MET-1METDST,M3.5.0/01,M10.5.0/02"; // Most of Europe
32+
//const char* Timezone = "CET-1CEST,M3.5.0,M10.5.0/3"; // Central Europe
33+
//const char* Timezone = "EST-2METDST,M3.5.0/01,M10.5.0/02"; // Most of Europe
34+
//const char* Timezone = "EST5EDT,M3.2.0,M11.1.0"; // EST USA
35+
//const char* Timezone = "CST6CDT,M3.2.0,M11.1.0"; // CST USA
36+
//const char* Timezone = "MST7MDT,M4.1.0,M10.5.0"; // MST USA
37+
//const char* Timezone = "NZST-12NZDT,M9.5.0,M4.1.0/3"; // Auckland
38+
//const char* Timezone = "EET-2EEST,M3.5.5/0,M10.5.5/0"; // Asia
39+
//const char* Timezone = "ACST-9:30ACDT,M10.1.0,M4.1.0/3": // Australia

examples/Waveshare_2_9_T5/Waveshare_2_9_T5.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static const uint8_t EPD_SCK = 18; // to EPD CLK
5151
static const uint8_t EPD_MISO = 2; // Master-In Slave-Out not used, as no data from display
5252
static const uint8_t EPD_MOSI = 23; // to EPD DIN
5353

54-
GxEPD2_BW<GxEPD2_290_T5, GxEPD2_290_T5::HEIGHT> display(GxEPD2_290(/*CS=D8*/ EPD_CS, /*DC=D3*/ EPD_DC, /*RST=D4*/ EPD_RST, /*BUSY=D2*/ EPD_BUSY));
54+
GxEPD2_BW<GxEPD2_290_T5, GxEPD2_290_T5::HEIGHT> display(GxEPD2_290_T5(/*CS=D8*/ EPD_CS, /*DC=D3*/ EPD_DC, /*RST=D4*/ EPD_RST, /*BUSY=D2*/ EPD_BUSY));
5555

5656
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts; // Select u8g2 font from here: https://github.com/olikraus/u8g2/wiki/fntlistall
5757
// Using fonts:

0 commit comments

Comments
 (0)