snapshot
This commit is contained in:
90
sketches/doorbell-touch-esp32-32e/Config.h
Normal file
90
sketches/doorbell-touch-esp32-32e/Config.h
Normal file
@@ -0,0 +1,90 @@
|
||||
#pragma once
|
||||
|
||||
// =====================================================================
|
||||
// Debug
|
||||
// =====================================================================
|
||||
#define DEBUG_MODE 1
|
||||
|
||||
// =====================================================================
|
||||
// WiFi Credentials
|
||||
// =====================================================================
|
||||
struct WiFiCred { const char *ssid; const char *pass; };
|
||||
static WiFiCred wifiNetworks[] = {
|
||||
{ "Dobro Veče", "goodnight" },
|
||||
{ "berylpunk", "dhgwilliam" },
|
||||
};
|
||||
static const int NUM_WIFI = sizeof(wifiNetworks) / sizeof(wifiNetworks[0]);
|
||||
|
||||
// =====================================================================
|
||||
// ntfy.sh Topics
|
||||
// =====================================================================
|
||||
#define NTFY_BASE "https://ntfy.sh"
|
||||
|
||||
#if DEBUG_MODE
|
||||
#define TOPIC_SUFFIX "_test"
|
||||
#else
|
||||
#define TOPIC_SUFFIX ""
|
||||
#endif
|
||||
|
||||
#define ALERT_URL NTFY_BASE "/ALERT_klubhaus_topic" TOPIC_SUFFIX "/json?since=10s&poll=1"
|
||||
#define SILENCE_URL NTFY_BASE "/SILENCE_klubhaus_topic" TOPIC_SUFFIX "/json?since=10s&poll=1"
|
||||
#define ADMIN_URL NTFY_BASE "/ADMIN_klubhaus_topic" TOPIC_SUFFIX "/json?since=10s&poll=1"
|
||||
#define STATUS_URL NTFY_BASE "/STATUS_klubhaus_topic" TOPIC_SUFFIX
|
||||
|
||||
// =====================================================================
|
||||
// Timing
|
||||
// =====================================================================
|
||||
#define POLL_INTERVAL_MS 15000
|
||||
#define BLINK_INTERVAL_MS 500
|
||||
#define STALE_MSG_THRESHOLD_S 600
|
||||
#define NTP_SYNC_INTERVAL_MS 3600000
|
||||
#define ALERT_TIMEOUT_MS 300000
|
||||
#define WAKE_DISPLAY_MS 5000
|
||||
#define TOUCH_DEBOUNCE_MS 300
|
||||
#define HEARTBEAT_INTERVAL_MS 30000
|
||||
|
||||
#if DEBUG_MODE
|
||||
#define BOOT_GRACE_MS 5000
|
||||
#else
|
||||
#define BOOT_GRACE_MS 30000
|
||||
#endif
|
||||
|
||||
// =====================================================================
|
||||
// E32R35T Hardware Pins (hardwired on PCB — do not change)
|
||||
// =====================================================================
|
||||
// LCD (HSPI)
|
||||
#define PIN_LCD_CS 15
|
||||
#define PIN_LCD_DC 2
|
||||
#define PIN_LCD_MOSI 13
|
||||
#define PIN_LCD_SCLK 14
|
||||
#define PIN_LCD_MISO 12
|
||||
#define PIN_LCD_BL 27
|
||||
|
||||
// Touch (XPT2046, shares HSPI)
|
||||
#define PIN_TOUCH_CS 33
|
||||
#define PIN_TOUCH_IRQ 36
|
||||
|
||||
// SD Card (VSPI — for future use)
|
||||
#define PIN_SD_CS 5
|
||||
#define PIN_SD_MOSI 23
|
||||
#define PIN_SD_SCLK 18
|
||||
#define PIN_SD_MISO 19
|
||||
|
||||
// RGB LED (active low)
|
||||
#define PIN_LED_RED 22
|
||||
#define PIN_LED_GREEN 16
|
||||
#define PIN_LED_BLUE 17
|
||||
|
||||
// Audio
|
||||
#define PIN_AUDIO_EN 4
|
||||
#define PIN_AUDIO_DAC 26
|
||||
|
||||
// Battery ADC
|
||||
#define PIN_BAT_ADC 34
|
||||
|
||||
// =====================================================================
|
||||
// Display
|
||||
// =====================================================================
|
||||
#define SCREEN_WIDTH 480 // landscape
|
||||
#define SCREEN_HEIGHT 320
|
||||
|
||||
Reference in New Issue
Block a user