| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #pragma once
- // Board- and application-wide configuration.
- //
- // Wi-Fi credentials and the outdoor sensor URL live in secrets.h, which is not
- // committed. Copy secrets.h.example to secrets.h before the first build.
- // ---------------------------------------------------------------- display ---
- // The panel is a 300 x 400 ST7305 reflective LCD. The application runs it
- // rotated (U8G2_R1), so the drawing surface is 400 wide by 300 high.
- #define LCD_NATIVE_WIDTH 300
- #define LCD_NATIVE_HEIGHT 400
- #define DISPLAY_WIDTH 400
- #define DISPLAY_HEIGHT 300
- #define RLCD_SCK_PIN 11
- #define RLCD_MOSI_PIN 12
- #define RLCD_DC_PIN 5
- #define RLCD_CS_PIN 40
- #define RLCD_RST_PIN 41
- #define RLCD_TE_PIN 6 // tearing effect output, unused
- // Layout: top 60% is time + date, bottom 40% is indoor | outdoor.
- #define LAYOUT_SPLIT_Y 180
- #define LAYOUT_MID_X 200
- // ------------------------------------------------------------------- i2c ---
- #define I2C_SDA_PIN 13
- #define I2C_SCL_PIN 14
- #define I2C_FREQ_HZ 400000
- #define PCF85063_ADDR 0x51
- #define SHTC3_ADDR 0x70
- // ------------------------------------------------------------------ time ---
- #define NTP_SERVER_1 "pool.ntp.org"
- #define NTP_SERVER_2 "time.google.com"
- // POSIX TZ string for Australia/Hobart (AEST-10, AEDT from Oct to Apr).
- #define TIMEZONE_POSIX "AEST-10AEDT,M10.1.0,M4.1.0/3"
- // Date line format, strftime(3). "MONDAY 24 AUGUST".
- #define DATE_FORMAT "%A %e %B"
- // -------------------------------------------------------------- intervals ---
- #define WIFI_CONNECT_TIMEOUT_MS 20000UL // give up on a connect attempt
- #define WIFI_RETRY_MS 60000UL // then retry this often
- #define NTP_RESYNC_MS (6UL * 60UL * 60UL * 1000UL)
- #define INDOOR_READ_MS 30000UL
- #define OUTDOOR_POLL_MS 30000UL
- #define OUTDOOR_STALE_MS (10UL * 60UL * 1000UL) // mark reading stale
- #define DISPLAY_TICK_MS 1000UL // check-for-change rate
- // ---------------------------------------------------------------- outdoor ---
- // HTTP timeout for one outdoor poll.
- #define OUTDOOR_HTTP_TIMEOUT_MS 5000
- // Plausible temperature range; readings outside it are rejected.
- #define TEMP_MIN_VALID -50.0f
- #define TEMP_MAX_VALID 80.0f
- #include "secrets.h"
|