From 20b81e0baed58305d86d967ba6d91da2fdefa998 Mon Sep 17 00:00:00 2001 From: Timm Bogner <64260873+timmbogner@users.noreply.github.com> Date: Wed, 8 Jun 2022 20:13:39 -0500 Subject: [PATCH] getting in shape... --- Examples/3_ESPNOW_Gateway/fdrs_config.h | 29 +++++++++++++------------ Examples/4_UART_Gateway/fdrs_config.h | 27 ++++++++++++----------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/Examples/3_ESPNOW_Gateway/fdrs_config.h b/Examples/3_ESPNOW_Gateway/fdrs_config.h index fc91e0e..8c363cf 100644 --- a/Examples/3_ESPNOW_Gateway/fdrs_config.h +++ b/Examples/3_ESPNOW_Gateway/fdrs_config.h @@ -5,7 +5,7 @@ //#include //Uncomment if you install the globals file #define DEBUG -#define UNIT_MAC 0x00 // The address of this gateway +#define UNIT_MAC 0x03 // The address of this gateway //Actions -- Define what happens when a packet arrives at each interface: //Current function options are: sendESPNOW(MAC), sendSerial(), sendMQTT(), bufferESPNOW(interface), bufferSerial(), and bufferLoRa(interface). @@ -18,15 +18,11 @@ //#define USE_LORA //#define USE_WIFI //Used only for MQTT gateway -#define WIFI_SSID "Your SSID" -#define WIFI_PASS "Your Password" -#define MQTT_ADDR "192.168.0.8" - // Peer addresses -#define ESPNOW1_PEER 0x04 // ESPNOW1 Address -#define ESPNOW2_PEER 0x05 // ESPNOW2 Address -#define LORA1_PEER 0x04 // LoRa1 Address -#define LORA2_PEER 0x05 // LoRa2 Address +#define ESPNOW1_PEER 0x0E // ESPNOW1 Address +#define ESPNOW2_PEER 0x0F // ESPNOW2 Address +#define LORA1_PEER 0x0E // LoRa1 Address +#define LORA2_PEER 0x0F // LoRa2 Address // Peer Actions #define ESPNOW1_ACT @@ -34,6 +30,15 @@ #define LORA1_ACT #define LORA2_ACT +//WiFi and MQTT Credentials -- Needed only for MQTT gateway +#define WIFI_SSID "Your SSID" +#define WIFI_PASS "Your Password" +#define MQTT_ADDR "192.168.0.8" +// MQTT Topics +#define TOPIC_DATA "FDRS/DATA" +#define TOPIC_STATUS "FDRS/STATUS" +#define TOPIC_COMMAND "FDRS/COMMAND" + //Pins for UART data interface (ESP32 only) #define RXD2 14 #define TXD2 15 @@ -60,11 +65,7 @@ #define LORAG_DELAY 1000 //#define LORA1_DELAY 1000 //#define LORA2_DELAY 1000 + //#define USE_LED //Not yet fully implemented #define LED_PIN 32 #define NUM_LEDS 4 - -// MQTT Topics -#define TOPIC_DATA "FDRS/DATA" -#define TOPIC_STATUS "FDRS/STATUS" -#define TOPIC_COMMAND "FDRS/COMMAND" diff --git a/Examples/4_UART_Gateway/fdrs_config.h b/Examples/4_UART_Gateway/fdrs_config.h index 87beec4..8e6076f 100644 --- a/Examples/4_UART_Gateway/fdrs_config.h +++ b/Examples/4_UART_Gateway/fdrs_config.h @@ -18,15 +18,11 @@ #define USE_LORA //#define USE_WIFI //Used only for MQTT gateway -#define WIFI_SSID "Your SSID" -#define WIFI_PASS "Your Password" -#define MQTT_ADDR "192.168.0.8" - // Peer addresses -#define ESPNOW1_PEER 0x04 // ESPNOW1 Address -#define ESPNOW2_PEER 0x05 // ESPNOW2 Address -#define LORA1_PEER 0x04 // LoRa1 Address -#define LORA2_PEER 0x05 // LoRa2 Address +#define ESPNOW1_PEER 0x0E // ESPNOW1 Address +#define ESPNOW2_PEER 0x0F // ESPNOW2 Address +#define LORA1_PEER 0x0E // LoRa1 Address +#define LORA2_PEER 0x0F // LoRa2 Address // Peer Actions #define ESPNOW1_ACT @@ -34,6 +30,15 @@ #define LORA1_ACT #define LORA2_ACT +//WiFi and MQTT Credentials -- Needed only for MQTT gateway +#define WIFI_SSID "Your SSID" +#define WIFI_PASS "Your Password" +#define MQTT_ADDR "192.168.0.8" +// MQTT Topics +#define TOPIC_DATA "FDRS/DATA" +#define TOPIC_STATUS "FDRS/STATUS" +#define TOPIC_COMMAND "FDRS/COMMAND" + //Pins for UART data interface (ESP32 only) #define RXD2 14 #define TXD2 15 @@ -60,11 +65,7 @@ #define LORAG_DELAY 1000 //#define LORA1_DELAY 1000 //#define LORA2_DELAY 1000 + //#define USE_LED //Not yet fully implemented #define LED_PIN 32 #define NUM_LEDS 4 - -// MQTT Topics -#define TOPIC_DATA "FDRS/DATA" -#define TOPIC_STATUS "FDRS/STATUS" -#define TOPIC_COMMAND "FDRS/COMMAND"