diff --git a/BresserWeatherSensorTTN.ino b/BresserWeatherSensorTTN.ino index 22e4baf..f6ea674 100644 --- a/BresserWeatherSensorTTN.ino +++ b/BresserWeatherSensorTTN.ino @@ -123,6 +123,8 @@ // 20240303 Added evaluation of temp_ok/humidity_ok/rain_ok (#82) // 20240325 Added configuration for M5Stack Core2 with M5Stack Module LoRa868 // 20240606 Replaced ESP32AnalogRead by analogReadMilliVolts() +// Updated board configurations after changes in +// Arduino ESP32 package v3.0.X // // ToDo: // - Split this file @@ -247,9 +249,9 @@ #define PIN_LMIC_DIO1 LORA_D1 #define PIN_LMIC_DIO2 LORA_D2 -#elif defined(ARDUINO_heltec_wireless_stick) || defined(ARDUINO_heltec_wifi_lora_32_V2) +#elif defined(ARDUINO_HELTEC_WIRELESS_STICK) || defined(ARDUINO_HELTEC_WIFI_LORA_32_V2) // https://github.com/espressif/arduino-esp32/blob/master/variants/heltec_wireless_stick/pins_arduino.h - // https://github.com/espressif/arduino-esp32/tree/master/variants/heltec_wifi_lora_32_V2/pins_ardiono.h + // https://github.com/espressif/arduino-esp32/blob/master/variants/heltec_wifi_lora_32_V2/pins_arduino.h #define PIN_LMIC_NSS SS #define PIN_LMIC_RST RST_LoRa #define PIN_LMIC_DIO0 DIO0 @@ -300,7 +302,7 @@ #pragma message("ARDUINO_ADAFRUIT_FEATHER_RP2040 defined; assuming RFM95W FeatherWing will be used") #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS") -#elif defined(FIREBEETLE_ESP32_COVER_LORA) +#elif defined(ARDUINO_DFROBOT_FIREBEETLE_ESP32) && defined(FIREBEETLE_ESP32_COVER_LORA) // https://wiki.dfrobot.com/FireBeetle_ESP32_IOT_Microcontroller(V3.0)__Supports_Wi-Fi_&_Bluetooth__SKU__DFR0478 // https://wiki.dfrobot.com/FireBeetle_Covers_LoRa_Radio_868MHz_SKU_TEL0125 #define PIN_LMIC_NSS 27 // D4 @@ -308,18 +310,25 @@ #define PIN_LMIC_DIO0 26 // D3 #define PIN_LMIC_DIO1 9 // D5 #define PIN_LMIC_DIO2 cMyLoRaWAN::lmic_pinmap::LMIC_UNUSED_PIN - #pragma message("FIREBEETLE_ESP32_COVER_LORA defined; assuming FireBeetle ESP32 with FireBeetle Cover LoRa will be used") + #pragma message("ARDUINO_DFROBOT_FIREBEETLE_ESP32 && FIREBEETLE_ESP32_COVER_LORA defined; assuming FireBeetle ESP32 with FireBeetle Cover LoRa will be used") #pragma message("Required wiring: D2 to RESET, D3 to DIO0, D4 to CS, D5 to DIO1") -#else +#elif defined(ARDUINO_DFROBOT_FIREBEETLE_ESP32) && defined(LORAWAN_NODE) // LoRaWAN_Node board // https://github.com/matthias-bs/LoRaWAN_Node + #pragma message("ARDUINO_DFROBOT_FIREBEETLE_ESP32 && LORAWAN_NODE defined; assuming LoRaWAN_Node board will be used") + #define PIN_LMIC_NSS 14 + #define PIN_LMIC_RST 12 + #define PIN_LMIC_DIO0 4 + #define PIN_LMIC_DIO1 16 + #define PIN_LMIC_DIO2 17 +#else + #pragma message("Unknown board configuration!") #define PIN_LMIC_NSS 14 #define PIN_LMIC_RST 12 #define PIN_LMIC_DIO0 4 #define PIN_LMIC_DIO1 16 #define PIN_LMIC_DIO2 17 - #endif diff --git a/BresserWeatherSensorTTNCfg.h b/BresserWeatherSensorTTNCfg.h index 38d3c0b..21776f6 100644 --- a/BresserWeatherSensorTTNCfg.h +++ b/BresserWeatherSensorTTNCfg.h @@ -70,6 +70,8 @@ // 20240325 Added configuration for M5Stack Core2 with M5Stack Module LoRa868 // 20240606 Removed workaround for ARDUINO_THINGPULSE_EPULSE_FEATHER // (Now available in arduino-esp32 v3.0.X) +// Updated board configurations after changes in +// Arduino ESP32 package v3.0.X // // Note: // Depending on board package file date, either @@ -93,10 +95,7 @@ // #define NVS_LOG //--- Select Board --- -#if !defined(ARDUINO_TTGO_LoRa32_V1) && !defined(ARDUINO_TTGO_LoRa32_V2) && \ - !defined(ARDUINO_TTGO_LoRa32_v21new) && !defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2) && \ - !defined(ARDUINO_FEATHER_ESP32) && !defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) && \ - !defined(ARDUINO_M5STACK_Core2) && !defined(ARDUINO_M5STACK_CORE2) +#if defined(ARDUINO_DFROBOT_FIREBEETLE_ESP32) // Use pinning for LoRaWAN Node #define LORAWAN_NODE diff --git a/README.md b/README.md index 6445d70..50f8dd1 100644 --- a/README.md +++ b/README.md @@ -157,9 +157,9 @@ If this is not what you need, you have to switch to Manual Configuration. | [LILYGO®TTGO-LORA32 V1](https://github.com/Xinyuan-LilyGo/TTGO-LoRa-Series) | "TTGO LoRa32-OLED" | "TTGO LoRa32 V1 (No TFCard)" | ARDUINO_TTGO_LORA32_V1 | SX1276 (HPD13A) | - | | [LILYGO®TTGO-LORA32 V2](https://github.com/LilyGO/TTGO-LORA32) | "TTGO LoRa32-OLED" | "TTGO LoRa32 V2" | ARDUINO_TTGO_LoRa32_V2 | SX1276 (HPD13A) | Wire DIO1 to GPIO33 | | [LILYGO®TTGO-LORA32 V2.1](https://www.lilygo.cc/products/lora3?variant=42272562282677) | "TTGO LoRa32-OLED" | "TTGO LoRa32 V2.1 (1.6.1)" | ARDUINO_TTGO_LoRa32_v21new | SX1276 (HPD13A) | - | - | [Heltec Wireless Stick](https://heltec.org/project/wireless-stick/) | "Heltec Wireless Stick" | n.a. | ARDUINO_heltec_wireless_stick | SX1276 | - | - | [LoRaWAN_Node](https://github.com/matthias-bs/LoRaWAN_Node) | "FireBeetle-ESP32" | n.a. | ARDUINO_ESP32_DEV -> LORAWAN_NODE | SX1276 (RFM95W) | - | - | [DFRobot FireBeetle ESP32 IoT Microcontroller](https://www.dfrobot.com/product-1590.html) with [FireBeetle Cover LoRa Radio 868MHz](https://www.dfrobot.com/product-1831.html) | "FireBeetle-ESP32" | n.a. | ARDUINO_ESP32_DEV & FIREBEETLE_ESP32_COVER_LORA | SX1276 (LoRa1276) | Wiring on the cover:
D2 to RESET
D3 to DIO0
D4 to CS
D5 to DIO1 | + | [Heltec Wireless Stick](https://heltec.org/project/wireless-stick/) | "Heltec Wireless Stick" | n.a. | ARDUINO_HELTEC_WIRELESS_STICK | SX1276 | - | + | [LoRaWAN_Node](https://github.com/matthias-bs/LoRaWAN_Node) | "FireBeetle-ESP32" | n.a. | ARDUINO_DFROBOT_FIREBEETLE_ESP32 & **LORAWAN_NODE** | SX1276 (RFM95W) | - | + | [DFRobot FireBeetle ESP32 IoT Microcontroller](https://www.dfrobot.com/product-1590.html) with [FireBeetle Cover LoRa Radio 868MHz](https://www.dfrobot.com/product-1831.html) | "FireBeetle-ESP32" | n.a. | ARDUINO_DFROBOT_FIREBEETLE_ESP32 & **FIREBEETLE_ESP32_COVER_LORA** | SX1276 (LoRa1276) | Wiring on the cover:
D2 to RESET
D3 to DIO0
D4 to CS
D5 to DIO1 | | [Adafruit Feather ESP32S2 with Adafruit LoRa Radio FeatherWing](https://github.com/matthias-bs/BresserWeatherSensorReceiver#adafruit-feather-esp32s2-with-adafruit-lora-radio-featherwing) | "Adafruit Feather ESP32-S2" | n.a. | ARDUINO_
ADAFRUIT_FEATHER_ESP32S2 | SX1276 (RFM95W) | **No Bluetooth available!**
Wiring on the Featherwing:
E to IRQ
D to CS
C to RST
A to DI01 | | [Thingpulse ePulse Feather](https://thingpulse.com/product/epulse-feather-low-power-esp32-development-board/) with [Adafruit LoRa Radio FeatherWing](https://www.adafruit.com/product/3231) | "Adafruit ESP32 Feather" | n.a. | ARDUINO_FEATHER_ESP32 | SX1276 (RFM95W) | Wiring on the Featherwing:
E to IRQ
D to CS
C to RST
A to DI01 | | [M5Stack Core2](https://docs.m5stack.com/en/core/core2) with [M5Stack Module LoRa868](https://docs.m5stack.com/en/module/lora868) | "M5Core2" | n.a. | ARDUINO_M5STACK_CORE2 | SX1276 (RA-01H) | Wiring on the LoRa868 Module:
DIO1 to GPIO35

"M5Unified" must be installed
`M5.begin()`is called to control power management |