mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
Added SF definition in sketch 1 and 4 and corrected esp_now_peer_info_t peerInfo;
This commit is contained in:
parent
5500ab271b
commit
083cc9b0e4
@ -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
|
||||
}
|
||||
|
@ -69,6 +69,7 @@ void setup() {
|
||||
if (!LoRa.begin(BAND)) {
|
||||
while (1);
|
||||
}
|
||||
LoRa.setSpreadingFactor(SF);
|
||||
DBG(" LoRa initialized.");
|
||||
#endif
|
||||
// UART_IF.println(sizeof(DataReading));
|
||||
|
@ -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"
|
||||
|
@ -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};
|
||||
|
Loading…
Reference in New Issue
Block a user