mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
added defaults
This commit is contained in:
parent
3dd50d7e0e
commit
f81e4f6eda
36
FDRS_Gateway2000/defaults.h
Normal file
36
FDRS_Gateway2000/defaults.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#define UNIT_MAC 0xFF // THIS UNIT
|
||||||
|
#define ESPNOW1_MAC 0xFF // ESPNOW1 Address
|
||||||
|
#define ESPNOW2_MAC 0xFF // ESPNOW2 Address
|
||||||
|
|
||||||
|
#define ESPNOW1_DELAY 0
|
||||||
|
#define ESPNOW2_DELAY 0
|
||||||
|
#define ESPNOWG_DELAY 0
|
||||||
|
#define SERIAL_DELAY 0
|
||||||
|
#define MQTT_DELAY 0
|
||||||
|
#define LORA_DELAY 0
|
||||||
|
|
||||||
|
#define ESPNOW1_ACT sendSerial();
|
||||||
|
#define ESPNOW2_ACT sendSerial();
|
||||||
|
#define ESPNOWG_ACT sendSerial();
|
||||||
|
#define SERIAL_ACT sendESPNOW(0);
|
||||||
|
#define MQTT_ACT sendSerial();
|
||||||
|
#define LORA_ACT sendSerial();
|
||||||
|
|
||||||
|
#define RXD2 21
|
||||||
|
#define TXD2 22
|
||||||
|
|
||||||
|
#define WIFI_NET "Your SSID"
|
||||||
|
#define WIFI_PASS "Password"
|
||||||
|
#define MQTT_ADDR "192.168.0.8"
|
||||||
|
|
||||||
|
//#define USE_LORA
|
||||||
|
#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
|
@ -2,19 +2,13 @@
|
|||||||
//
|
//
|
||||||
// GATEWAY 2.000 Configuration
|
// GATEWAY 2.000 Configuration
|
||||||
|
|
||||||
|
#include "defaults.h"
|
||||||
#define UNIT_MAC 0x00 // THIS UNIT
|
#define UNIT_MAC 0x00 // THIS UNIT
|
||||||
#define ESPNOW1_MAC 0x01 // ESPNOW1 Address
|
|
||||||
#define ESPNOW2_MAC 0x01 // ESPNOW2 Address
|
|
||||||
|
|
||||||
//Actions -- Define what happens when a packet arrives at each interface:
|
//Actions -- Define what happens when a packet arrives at each interface:
|
||||||
//Current function options are: sendESPNOW(interface), sendSerial(), sendMQTT(), and sendLoRa().
|
//Current function options are: sendESPNOW(interface), sendSerial(), sendMQTT(), and sendLoRa().
|
||||||
|
|
||||||
#define ESPNOW1_ACT sendSerial();
|
|
||||||
#define ESPNOW2_ACT sendSerial();
|
|
||||||
#define ESPNOWG_ACT sendSerial();
|
#define ESPNOWG_ACT sendSerial();
|
||||||
#define SERIAL_ACT sendESPNOW(0);
|
|
||||||
#define MQTT_ACT sendSerial();
|
|
||||||
#define LORA_ACT sendSerial();
|
|
||||||
|
|
||||||
//ESP32 Only
|
//ESP32 Only
|
||||||
#define RXD2 21
|
#define RXD2 21
|
||||||
@ -48,26 +42,19 @@
|
|||||||
//#define ESPNOW1_ACT sendSerial();
|
//#define ESPNOW1_ACT sendSerial();
|
||||||
//#define ESPNOW2_ACT sendSerial();
|
//#define ESPNOW2_ACT sendSerial();
|
||||||
//#define ESPNOWG_ACT sendSerial();
|
//#define ESPNOWG_ACT sendSerial();
|
||||||
//#define SERIAL_ACT sendESPNOW(0);
|
//#define SERIAL_ACT sendESPNOW(0); //sendESPNOW() routine will soon change
|
||||||
//#define MQTT_ACT sendSerial();
|
//#define MQTT_ACT
|
||||||
//#define LORA_ACT sendSerial();
|
//#define LORA_ACT sendSerial();
|
||||||
|
|
||||||
//Use these settings for a gateway that recieves serial (UART) data and sends MQTT.
|
//Use these settings for a gateway that recieves serial (UART) data and sends MQTT.
|
||||||
//#define USE_WIFI
|
//#define USE_WIFI
|
||||||
//#define ESPNOW1_ACT
|
|
||||||
//#define ESPNOW2_ACT
|
|
||||||
//#define ESPNOWG_ACT
|
|
||||||
//#define SERIAL_ACT sendMQTT();
|
//#define SERIAL_ACT sendMQTT();
|
||||||
//#define MQTT_ACT sendSerial();
|
|
||||||
//#define LORA_ACT sendSerial();
|
|
||||||
|
|
||||||
//Use these settings for a basic repeater addressed to the final gateway.
|
//Use these settings for a basic repeater addressed to the final gateway.
|
||||||
//#define UNIT_MAC 0x01 // THIS UNIT
|
//#define UNIT_MAC 0x01 // THIS UNIT
|
||||||
//#define ESPNOW1_MAC 0x00 // ESPNOW1 Address
|
//#define ESPNOW1_MAC 0x00 // ESPNOW1 Address
|
||||||
//#define ESPNOW2_MAC 0x02 // ESPNOW2 Address
|
//#define ESPNOW2_MAC 0x02 // ESPNOW2 Address
|
||||||
//#define ESPNOW1_ACT sendESPNOW(2);
|
//#define ESPNOW1_ACT sendESPNOW(2);
|
||||||
//#define ESPNOW2_ACT sendESPNOW(1);
|
//#define ESPNOW2_ACT sendESPNOW(1); //sendESPNOW() routine will soon change
|
||||||
//#define ESPNOWG_ACT sendESPNOW(1);
|
//#define ESPNOWG_ACT sendESPNOW(1);
|
||||||
//#define SERIAL_ACT
|
|
||||||
//#define MQTT_ACT
|
|
||||||
//#define LORA_ACT
|
|
||||||
|
Loading…
Reference in New Issue
Block a user