diff --git a/Examples/1_LoRa_Sensor/fdrs_sensor.h b/Examples/1_LoRa_Sensor/fdrs_sensor.h index 7c9b973..876e436 100644 --- a/Examples/1_LoRa_Sensor/fdrs_sensor.h +++ b/Examples/1_LoRa_Sensor/fdrs_sensor.h @@ -30,6 +30,7 @@ #define WIFI_PASS myPASSWORD #define MQTT_ADDR MQTT_BROKER #define BAND myBAND +#define SF mySF #else #define WIFI_NET "Your SSID" #define WIFI_PASS "Password" @@ -154,6 +155,7 @@ void beginFDRS() { if (!LoRa.begin(BAND)) { while (1); } + LoRa.setSpreadingFactor(SF); DBG(" LoRa Initialized."); #endif } diff --git a/Examples/4_UART_Gateway/4_UART_Gateway.ino b/Examples/4_UART_Gateway/4_UART_Gateway.ino index 9acd2e3..01fb703 100644 --- a/Examples/4_UART_Gateway/4_UART_Gateway.ino +++ b/Examples/4_UART_Gateway/4_UART_Gateway.ino @@ -69,6 +69,7 @@ void setup() { if (!LoRa.begin(BAND)) { while (1); } + LoRa.setSpreadingFactor(SF); DBG(" LoRa initialized."); #endif // UART_IF.println(sizeof(DataReading)); diff --git a/Examples/4_UART_Gateway/fdrs_config.h b/Examples/4_UART_Gateway/fdrs_config.h index 75ad250..189c88d 100644 --- a/Examples/4_UART_Gateway/fdrs_config.h +++ b/Examples/4_UART_Gateway/fdrs_config.h @@ -44,6 +44,7 @@ #define WIFI_PASS myPASSWORD #define MQTT_ADDR MQTT_BROKER #define BAND myBAND +#define SF mySF #else #define WIFI_NET "Your SSID" #define WIFI_PASS "Password" diff --git a/Examples/4_UART_Gateway/fdrs_functions.h b/Examples/4_UART_Gateway/fdrs_functions.h index 44770bf..fd89f89 100644 --- a/Examples/4_UART_Gateway/fdrs_functions.h +++ b/Examples/4_UART_Gateway/fdrs_functions.h @@ -6,7 +6,9 @@ const uint8_t espnow_size = 250 / sizeof(DataReading); const uint8_t lora_size = 256 / sizeof(DataReading); const uint8_t mac_prefix[] = {MAC_PREFIX}; - esp_now_peer_info_t peerInfo; +#if defined(ESP32) +esp_now_peer_info_t peerInfo; +#endif uint8_t broadcast_mac[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; uint8_t selfAddress[] = {MAC_PREFIX, UNIT_MAC};