2022-06-13 04:43:35 +00:00
|
|
|
// FARM DATA RELAY SYSTEM
|
|
|
|
//
|
2022-07-11 14:25:03 +00:00
|
|
|
// Sensor Configuration File
|
2022-07-12 13:12:34 +00:00
|
|
|
// By default global settings defined in fdrs_globals.h will be used for all sensors.
|
2022-07-11 14:25:03 +00:00
|
|
|
// If you need to change a specific setting, uncomment and set to your needs further below.
|
2022-06-13 04:43:35 +00:00
|
|
|
//
|
2022-07-12 13:12:34 +00:00
|
|
|
#ifndef __FDRS_SENSOR_CONFIG__H__
|
|
|
|
#define __FDRS_SENSOR_CONFIG__H__
|
2022-06-13 04:43:35 +00:00
|
|
|
|
2022-07-11 14:25:03 +00:00
|
|
|
#define FDRS_DEBUG // Comment, if you do not want to see debug messages
|
|
|
|
#include <fdrs_globals.h> // Comment if you want to set specific values for this sensor here
|
2022-06-13 04:43:35 +00:00
|
|
|
|
2022-07-11 14:25:03 +00:00
|
|
|
#define READING_ID 1 //Unique ID for this sensor
|
|
|
|
#define GTWY_MAC 0x04 //Address of the nearest gateway
|
2022-06-13 04:43:35 +00:00
|
|
|
|
|
|
|
#define DEEP_SLEEP
|
|
|
|
//#define POWER_CTRL 14
|
|
|
|
|
2022-07-12 13:12:34 +00:00
|
|
|
// Uncomment the sensor type you want to use
|
2022-07-14 13:29:54 +00:00
|
|
|
#define USE_LORA
|
2022-07-12 13:12:34 +00:00
|
|
|
//#define USE_ESPNOW
|
|
|
|
|
2022-07-11 14:25:03 +00:00
|
|
|
//Pins for UART data interface (ESP32 only)
|
|
|
|
#define RXD2 14
|
|
|
|
#define TXD2 15
|
|
|
|
|
|
|
|
// SPI Configuration -- Needed only on Boards with multiple SPI interfaces like the ESP32
|
2022-07-07 10:37:04 +00:00
|
|
|
#define SPI_SCK 5
|
|
|
|
#define SPI_MISO 19
|
|
|
|
#define SPI_MOSI 27
|
2022-07-07 10:38:57 +00:00
|
|
|
|
2022-07-11 14:25:03 +00:00
|
|
|
// LoRa Pin Configuration -- Uncomment and configure if you are using LoRa
|
2022-07-07 10:37:04 +00:00
|
|
|
#define LORA_SS 18
|
|
|
|
#define LORA_RST 14
|
|
|
|
#define LORA_DIO0 26
|
2022-07-11 14:25:03 +00:00
|
|
|
|
|
|
|
|
2022-07-12 13:12:34 +00:00
|
|
|
// LoRa Transport Configuration -- This should be globally configured in fdrs_globals.h. If you need a
|
2022-07-11 14:25:03 +00:00
|
|
|
// specific band and spreading factor for this sensor, configure below.
|
2022-06-13 04:43:35 +00:00
|
|
|
//433E6 for Asia
|
|
|
|
//866E6 for Europe
|
|
|
|
//915E6 for North America
|
2022-07-11 14:25:03 +00:00
|
|
|
//#define LORA_BAND 915E6
|
|
|
|
//#define LORA_SF 7
|
|
|
|
|
2022-07-12 13:12:34 +00:00
|
|
|
// MQTT Configuration -- This should be globally configured in fdrs_globals.h. If you need to specify
|
|
|
|
// a different MQTT server for this sensor, configure below.
|
|
|
|
//#define MQTT_ADDR "192.168.0.8"
|
|
|
|
//#define MQTT_AUTH //uncomment to enable MQTT authentication
|
|
|
|
//#define MQTT_USER "Your MQTT Username"
|
|
|
|
//#define MQTT_PASS "Your MQTT Password"
|
|
|
|
|
2022-07-14 11:58:34 +00:00
|
|
|
#endif //__FDRS_SENSOR_CONFIG__H__
|