You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
C
40 lines
1.2 KiB
C
// FARM DATA RELAY SYSTEM
|
|
//
|
|
// Sensor Configuration
|
|
|
|
#include <fdrs_globals.h>
|
|
|
|
#define READING_ID 1 //Unique ID for this sensor
|
|
#define GTWY_MAC 0x01 //Address of the nearest gateway
|
|
|
|
#define CONTROL_1 133 //Address for controller 1
|
|
#define CONTROL_2 134 //Address for controller 2
|
|
#define CONTROL_3 135 //Address for controller 3
|
|
#define CONTROL_4 136 //Address for controller 4
|
|
|
|
|
|
#define USE_ESPNOW
|
|
//#define USE_LORA
|
|
#define DEEP_SLEEP
|
|
//#define POWER_CTRL 14
|
|
#define FDRS_DEBUG
|
|
|
|
//SPI Configuration -- Needed only on chipsets with multiple SPI interfaces (ESP32)
|
|
#define SPI_SCK 5
|
|
#define SPI_MISO 19
|
|
#define SPI_MOSI 27
|
|
|
|
//LoRa Configuration
|
|
#define LORA_SS 18
|
|
#define LORA_RST 14
|
|
#define LORA_DIO0 26
|
|
//433E6 for Asia
|
|
//866E6 for Europe
|
|
//915E6 for North America
|
|
//#define LORA_BAND 915E6 // LoRa Frequency Band
|
|
//#define LORA_SF 7 // LoRa Spreading Factor
|
|
//#define LORA_TXPWR 17 // LoRa TX power in dBm (+2dBm - +20dBm), default is +17dBm
|
|
//#define LORA_ACK // Request LoRa acknowledgment. Increases battery usage.
|
|
//#define LORA_ACK_TIMEOUT 400 // LoRa ACK timeout in ms. (Minimum = 200)
|
|
//#define LORA_RETRIES 2 // LoRa ACK retries [0 - 3]
|