2021-12-06 17:36:18 +00:00
|
|
|
// FARM DATA RELAY SYSTEM
|
|
|
|
//
|
|
|
|
// GATEWAY 2.000 Configuration
|
2022-01-30 03:17:27 +00:00
|
|
|
|
2022-02-06 14:47:33 +00:00
|
|
|
#include "defaults.h"
|
2022-02-07 17:43:36 +00:00
|
|
|
|
2022-02-19 01:47:40 +00:00
|
|
|
#define UNIT_MAC 0x00 // THIS UNIT
|
2022-01-30 03:17:27 +00:00
|
|
|
|
|
|
|
//Actions -- Define what happens when a packet arrives at each interface:
|
2022-02-17 06:12:18 +00:00
|
|
|
//Current function options are: sendESPNOW(MAC), sendSerial(), sendMQTT(), bufferESPNOW(interface), bufferSerial(), and bufferLoRa(interface).
|
2022-02-07 17:43:36 +00:00
|
|
|
|
2022-01-30 03:17:27 +00:00
|
|
|
#define ESPNOWG_ACT sendSerial();
|
2022-03-08 17:00:09 +00:00
|
|
|
#define SERIAL_ACT //sendMQTT();
|
2022-02-19 01:47:40 +00:00
|
|
|
#define MQTT_ACT
|
|
|
|
#define LORAG_ACT
|
2022-02-17 06:12:18 +00:00
|
|
|
|
|
|
|
|
2022-01-30 03:17:27 +00:00
|
|
|
//ESP32 Only
|
2022-03-08 17:00:09 +00:00
|
|
|
#define RXD2 14
|
|
|
|
#define TXD2 15
|
|
|
|
#define UART_IF Serial1
|
2021-12-07 17:36:45 +00:00
|
|
|
|
2022-03-08 17:00:09 +00:00
|
|
|
#define USE_WIFI // You should not use ESP-NOW while WiFi is in use.
|
2022-01-05 00:02:12 +00:00
|
|
|
#define WIFI_NET "Your SSID"
|
|
|
|
#define WIFI_PASS "Password"
|
|
|
|
#define MQTT_ADDR "192.168.0.8"
|
2021-12-07 03:52:43 +00:00
|
|
|
|
2021-12-07 17:36:45 +00:00
|
|
|
//#define USE_LORA
|
2022-01-05 00:02:12 +00:00
|
|
|
#define SCK 5
|
|
|
|
#define MISO 19
|
|
|
|
#define MOSI 27
|
|
|
|
#define SS 18
|
|
|
|
#define RST 14
|
|
|
|
#define DIO0 26
|
|
|
|
//433E6 for Asia
|
|
|
|
//866E6 for Europe
|
|
|
|
//915E6 for North America
|
|
|
|
#define BAND 915E6
|