Added SF definition in sketch 1 and 4 and corrected esp_now_peer_info_t peerInfo;

This commit is contained in:
sensorsiot 2022-05-22 09:15:04 +02:00
parent 5500ab271b
commit 083cc9b0e4
4 changed files with 7 additions and 1 deletions

View File

@ -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
}

View File

@ -69,6 +69,7 @@ void setup() {
if (!LoRa.begin(BAND)) {
while (1);
}
LoRa.setSpreadingFactor(SF);
DBG(" LoRa initialized.");
#endif
// UART_IF.println(sizeof(DataReading));

View File

@ -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"

View File

@ -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};
#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};