2022-08-04 03:19:20 +00:00
|
|
|
// FARM DATA RELAY SYSTEM
|
|
|
|
//
|
|
|
|
// Sensor Configuration
|
|
|
|
|
|
|
|
|
2023-01-26 01:28:18 +00:00
|
|
|
#define READING_ID 1 //Unique ID for this sensor
|
2022-08-04 03:19:20 +00:00
|
|
|
#define GTWY_MAC 0x01 //Address of the nearest gateway
|
|
|
|
|
2023-01-26 01:28:18 +00:00
|
|
|
#define USE_ESPNOW
|
|
|
|
//#define USE_LORA
|
2022-08-04 03:19:20 +00:00
|
|
|
#define DEEP_SLEEP
|
|
|
|
//#define POWER_CTRL 14
|
|
|
|
#define FDRS_DEBUG
|
2024-02-11 03:59:32 +00:00
|
|
|
|
|
|
|
// I2C - OLED or RTC
|
|
|
|
#define I2C_SDA 5
|
|
|
|
#define I2C_SCL 6
|
|
|
|
|
|
|
|
// OLED -- Displays console debugging messages on an SSD1306 I²C OLED
|
|
|
|
// #define USE_OLED
|
|
|
|
#define OLED_HEADER "FDRS"
|
|
|
|
#define OLED_PAGE_SECS 30
|
|
|
|
#define OLED_RST -1
|
|
|
|
|
2022-11-30 04:28:51 +00:00
|
|
|
// LoRa Configuration
|
2022-12-03 05:39:44 +00:00
|
|
|
#define RADIOLIB_MODULE SX1276 //Tested on SX1276
|
2022-08-04 03:19:20 +00:00
|
|
|
#define LORA_SS 18
|
|
|
|
#define LORA_RST 14
|
2023-01-30 17:33:06 +00:00
|
|
|
#define LORA_DIO 26
|
2024-02-11 03:59:32 +00:00
|
|
|
#define LORA_BUSY 33
|
|
|
|
//#define USE_SX126X
|
|
|
|
|
|
|
|
//#define CUSTOM_SPI
|
|
|
|
#define LORA_SPI_SCK 5
|
|
|
|
#define LORA_SPI_MISO 19
|
|
|
|
#define LORA_SPI_MOSI 27
|
2022-09-08 18:48:58 +00:00
|
|
|
|
2022-12-03 05:39:44 +00:00
|
|
|
#define LORA_TXPWR 17 // LoRa TX power in dBm (: +2dBm - +17dBm (for SX1276-7) +20dBm (for SX1278))
|
|
|
|
#define LORA_ACK // Request LoRa acknowledgment.
|
2024-02-11 03:59:32 +00:00
|
|
|
|
|
|
|
// Time settings
|
|
|
|
#define USDST
|
|
|
|
// #define EUDST
|
|
|
|
#define STD_OFFSET (-6) // Local standard time offset in hours from UTC - if unsure, check https://time.is
|
|
|
|
#define DST_OFFSET (STD_OFFSET + 1) // Local savings time offset in hours from UTC - if unsure, check https://time.is
|
|
|
|
#define TIME_PRINTTIME 15 // Time, in minutes, between printing local time to debug
|