From 89ae44aa3d04a530f1a4f132d56803ec8e8b4486 Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Mon, 10 Apr 2023 17:52:40 +0200 Subject: [PATCH 01/11] Workaround for 3-in-1 Professional Wind Gauge / Anemometer Decoding reverted back to https://github.com/merbanan/rtl_433/blob/master/src/devices/bresser_6in1.c. --- src/WeatherSensor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/WeatherSensor.cpp b/src/WeatherSensor.cpp index 58ae6648..80248e77 100644 --- a/src/WeatherSensor.cpp +++ b/src/WeatherSensor.cpp @@ -691,8 +691,12 @@ DecodeStatus WeatherSensor::decodeBresser6In1Payload(uint8_t *msg, uint8_t msgSi if (temp_ok) { bool sign = (msg[13] >> 3) & 1; int temp_raw = (msg[12] >> 4) * 100 + (msg[12] & 0x0f) * 10 + (msg[13] >> 4); - float temp = ((sign) ? (temp_raw - 1000) : temp_raw) * 0.1f; - + //Workaround for 3-in-1 Professional Wind Gauge / Anemometer + //float temp = ((sign) ? (temp_raw - 1000) : temp_raw) * 0.1f; + float temp = temp_raw * 0.1f; + if (temp_raw > 600) + temp = (temp_raw - 1000) * 0.1f; + sensor[slot].temp_c = temp; sensor[slot].battery_ok = (msg[13] >> 1) & 1; // b[13] & 0x02 is battery_good, s.a. #1993 sensor[slot].humidity = (msg[14] >> 4) * 10 + (msg[14] & 0x0f); From beb5751a700e6000104295bc8b27fe7e03522694 Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Tue, 11 Apr 2023 19:01:42 +0200 Subject: [PATCH 02/11] Changed temperature decoding in decodeBresser6In1Payload() --- src/WeatherSensor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/WeatherSensor.cpp b/src/WeatherSensor.cpp index 80248e77..74df6f85 100644 --- a/src/WeatherSensor.cpp +++ b/src/WeatherSensor.cpp @@ -692,10 +692,10 @@ DecodeStatus WeatherSensor::decodeBresser6In1Payload(uint8_t *msg, uint8_t msgSi bool sign = (msg[13] >> 3) & 1; int temp_raw = (msg[12] >> 4) * 100 + (msg[12] & 0x0f) * 10 + (msg[13] >> 4); //Workaround for 3-in-1 Professional Wind Gauge / Anemometer - //float temp = ((sign) ? (temp_raw - 1000) : temp_raw) * 0.1f; - float temp = temp_raw * 0.1f; - if (temp_raw > 600) - temp = (temp_raw - 1000) * 0.1f; + float temp = ((sign) ? -temp_raw : temp_raw) * 0.1f; + //float temp = temp_raw * 0.1f; + //if (temp_raw > 600) + // temp = (temp_raw - 1000) * 0.1f; sensor[slot].temp_c = temp; sensor[slot].battery_ok = (msg[13] >> 1) & 1; // b[13] & 0x02 is battery_good, s.a. #1993 From ac39fd19206b2b492497bfc5a89ae670a1147117 Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:46:25 +0200 Subject: [PATCH 03/11] Update WeatherSensor.cpp --- src/WeatherSensor.cpp | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/src/WeatherSensor.cpp b/src/WeatherSensor.cpp index 74df6f85..818657aa 100644 --- a/src/WeatherSensor.cpp +++ b/src/WeatherSensor.cpp @@ -56,6 +56,7 @@ // 20230114 Modified decodeBresser6In1Payload() to distinguish msg type based on 'flags' (msg[16]) // 20230228 Added Bresser 7 in 1 decoder by Jorge Navarro-Ortiz (jorgenavarro@ugr.es) // 20230329 Fixed issue introduced with 7 in 1 decoder +// 20230412 Added workaround for Professional Wind Gauge / Anemometer, P/N 7002531 // // ToDo: // - @@ -79,6 +80,10 @@ uint32_t const sensor_ids_exc[] = SENSOR_IDS_EXC; // List of sensor IDs to be included - if empty, handle all available sensors uint32_t const sensor_ids_inc[] = SENSOR_IDS_INC; +// List of sensor IDs of the model "BRESSER 3-in-1 Professional Wind Gauge / Anemometer" +// P/N 7002531 - requiring special heandling in decodeBresser5In1Payload() +uint32_t const sensor_ids_decode3in1[] = SENSOR_IDS_DECODE3IN1; + int16_t WeatherSensor::begin(void) { // https://github.com/RFD-FHEM/RFFHEM/issues/607#issuecomment-830818445 // Freq: 868.300 MHz, Bandwidth: 203 KHz, rAmpl: 33 dB, sens: 8 dB, DataRate: 8207.32 Baud @@ -385,6 +390,21 @@ int WeatherSensor::findType(uint8_t type, uint8_t ch) return -1; } +// +// Check if sensor is in sensor_ids_decode3in1[] +// +bool is_decode3in1(uint32_t id) + uint8_t n_3in1 = sizeof(sensor_ids_decode3in1)/4; + if (n_3in1 != 0) { + for (int i=0; i> 3) & 1; int temp_raw = (msg[12] >> 4) * 100 + (msg[12] & 0x0f) * 10 + (msg[13] >> 4); - //Workaround for 3-in-1 Professional Wind Gauge / Anemometer - float temp = ((sign) ? -temp_raw : temp_raw) * 0.1f; - //float temp = temp_raw * 0.1f; - //if (temp_raw > 600) - // temp = (temp_raw - 1000) * 0.1f; + float temp; + + // Workaround for 3-in-1 Professional Wind Gauge / Anemometer + if (f_3in1) { + temp = ((sign) ? -temp_raw : temp_raw) * 0.1f; + } else { + temp = ((sign) ? (temp_raw - 1000) : temp_raw) * 0.1f; + } sensor[slot].temp_c = temp; sensor[slot].battery_ok = (msg[13] >> 1) & 1; // b[13] & 0x02 is battery_good, s.a. #1993 sensor[slot].humidity = (msg[14] >> 4) * 10 + (msg[14] & 0x0f); // apparently ff01 or 0000 if not available, ???0 if valid, inverted BCD - uv_ok = (~msg[15] & 0xff) <= 0x99 && (~msg[16] & 0xf0) <= 0x90; + uv_ok = (~msg[15] & 0xff) <= (0x99 && (~msg[16] & 0xf0) <= 0x90) && !f_3in1; if (uv_ok) { int uv_raw = ((~msg[15] & 0xf0) >> 4) * 100 + (~msg[15] & 0x0f) * 10 + ((~msg[16] & 0xf0) >> 4); sensor[slot].uv = uv_raw * 0.1f; @@ -772,8 +797,10 @@ DecodeStatus WeatherSensor::decodeBresser6In1Payload(uint8_t *msg, uint8_t msgSi sensor[slot].valid = true; - // Weather station data is split into two separate messages - sensor[slot].complete = ((sensor[slot].s_type == SENSOR_TYPE_WEATHER1) && sensor[slot].temp_ok && sensor[slot].rain_ok) || (sensor[slot].s_type != SENSOR_TYPE_WEATHER1); + // Weather station data is split into two separate messages (except for Professional Wind Gauge) + sensor[slot].complete = ((sensor[slot].s_type == SENSOR_TYPE_WEATHER1) && sensor[slot].temp_ok && sensor[slot].rain_ok) || + f_3in1 || + (sensor[slot].s_type != SENSOR_TYPE_WEATHER1); // Save rssi to sensor specific data set sensor[slot].rssi = rssi; From 73f55565b16c24a600db33a3cec6023f5459eefc Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:51:41 +0200 Subject: [PATCH 04/11] Update WeatherSensorCfg.h --- src/WeatherSensorCfg.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/WeatherSensorCfg.h b/src/WeatherSensorCfg.h index 46bc8590..a4b32253 100644 --- a/src/WeatherSensorCfg.h +++ b/src/WeatherSensorCfg.h @@ -40,6 +40,7 @@ // 20230301 Added pin definitions for Wireless_Stick (from Heltec) // 20230316 Added pin definitions for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232 // 20230330 Added pin definitions and changes for Adafruit Feather 32u4 (AVR) RFM95 LoRa Radio +// 20230412 Added workaround for Professional Wind Gauge / Anemometer, P/N 7002531 // // ToDo: // - @@ -158,6 +159,10 @@ #define SENSOR_IDS_INC {} //#define SENSOR_IDS_INC { 0x83750871 } +// List of sensor IDs of the model "BRESSER 3-in-1 Professional Wind Gauge / Anemometer" +// P/N 7002531 - requiring special heandling in decodeBresser5In1Payload() +//#define SENSOR_IDS_DECODE3IN1 {} +#define SENSOR_IDS_DECODE3IN1 { 0x2C100512 } // ------------------------------------------------------------------------------------------------ // --- Debug Logging Output --- From 9220c905768b7fa2200e731c070f613c463f14ac Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:59:10 +0200 Subject: [PATCH 05/11] Update WeatherSensor.cpp --- src/WeatherSensor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WeatherSensor.cpp b/src/WeatherSensor.cpp index 818657aa..2f6fc187 100644 --- a/src/WeatherSensor.cpp +++ b/src/WeatherSensor.cpp @@ -393,7 +393,8 @@ int WeatherSensor::findType(uint8_t type, uint8_t ch) // // Check if sensor is in sensor_ids_decode3in1[] // -bool is_decode3in1(uint32_t id) +bool WeatherSensor::is_decode3in1(uint32_t id) +{ uint8_t n_3in1 = sizeof(sensor_ids_decode3in1)/4; if (n_3in1 != 0) { for (int i=0; i Date: Wed, 12 Apr 2023 19:46:34 +0200 Subject: [PATCH 06/11] Update WeatherSensor.h --- src/WeatherSensor.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/WeatherSensor.h b/src/WeatherSensor.h index 3790234b..fe670d1b 100644 --- a/src/WeatherSensor.h +++ b/src/WeatherSensor.h @@ -271,6 +271,16 @@ class WeatherSensor { */ int findType(uint8_t type, uint8_t channel = 0xFF); + /*! + * Check if sensor ID is in sensor_ids_decode3in1[] + * + * \param id sensor ID + * + * \returns true if sensor is in sensor_ids_decode3in1[], + * false otherwise + */ + bool is_decode3in1(uint32_t id); + private: struct Sensor *pData; //!< pointer to slot in sensor data array From 6f14bfa1d2013136056b79fad351a5233a4c8266 Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Thu, 13 Apr 2023 06:51:34 +0200 Subject: [PATCH 07/11] Update WeatherSensor.cpp --- src/WeatherSensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WeatherSensor.cpp b/src/WeatherSensor.cpp index 2f6fc187..fc9b279b 100644 --- a/src/WeatherSensor.cpp +++ b/src/WeatherSensor.cpp @@ -399,7 +399,7 @@ bool WeatherSensor::is_decode3in1(uint32_t id) if (n_3in1 != 0) { for (int i=0; i Date: Thu, 13 Apr 2023 06:52:47 +0200 Subject: [PATCH 08/11] Update WeatherSensor.h --- src/WeatherSensor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/WeatherSensor.h b/src/WeatherSensor.h index fe670d1b..a8f03c04 100644 --- a/src/WeatherSensor.h +++ b/src/WeatherSensor.h @@ -54,6 +54,7 @@ // 20230228 Added Bresser 7 in 1 decoder by Jorge Navarro-Ortiz (jorgenavarro@ugr.es) // 20230328 Added MSG_BUF_SIZE // 20230330 Added changes for Adafruit Feather 32u4 LoRa Radio +// 20230412 Added workaround for Professional Wind Gauge / Anemometer, P/N 7002531 // // ToDo: // - From c9067f55d90d5f011c96d24f056baa61a4e013e3 Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Mon, 29 May 2023 19:12:20 +0200 Subject: [PATCH 09/11] Added pin definitions for DFRobot FireBeetle ESP32 with FireBeetle Cover LoRa --- src/WeatherSensorCfg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/WeatherSensorCfg.h b/src/WeatherSensorCfg.h index a4b32253..a0fe4091 100644 --- a/src/WeatherSensorCfg.h +++ b/src/WeatherSensorCfg.h @@ -41,6 +41,7 @@ // 20230316 Added pin definitions for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232 // 20230330 Added pin definitions and changes for Adafruit Feather 32u4 (AVR) RFM95 LoRa Radio // 20230412 Added workaround for Professional Wind Gauge / Anemometer, P/N 7002531 +// 20230420 Added pin definitions for DFRobot FireBeetle ESP32 with FireBeetle Cover LoRa // // ToDo: // - From 15ec67aea2cfdf09ca12a059b06e886b8d004dc6 Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Mon, 29 May 2023 19:16:37 +0200 Subject: [PATCH 10/11] Update WeatherSensorCfg.h.template --- src/WeatherSensorCfg.h.template | 69 ++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/src/WeatherSensorCfg.h.template b/src/WeatherSensorCfg.h.template index 2c7e819d..0a83cf9a 100644 --- a/src/WeatherSensorCfg.h.template +++ b/src/WeatherSensorCfg.h.template @@ -39,6 +39,9 @@ // 20230208 Added pin definitions for ARDUINO_TTGO_LoRa32_V2 // 20230301 Added pin definitions for Wireless_Stick (from Heltec) // 20230316 Added pin definitions for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232 +// 20230330 Added pin definitions and changes for Adafruit Feather 32u4 (AVR) RFM95 LoRa Radio +// 20230412 Added workaround for Professional Wind Gauge / Anemometer, P/N 7002531 +// 20230420 Added pin definitions for DFRobot FireBeetle ESP32 with FireBeetle Cover LoRa // // ToDo: // - @@ -127,6 +130,10 @@ #define LORAWAN_NODE #define USE_SX1276 +#elif defined(ARDUINO_AVR_FEATHER32U4) + #pragma message("ARDUINO_AVR_FEATHER32U4 defined; assuming this is the Arduino Feather 32u4 RFM95 LoRa Radio") + #define USE_SX1276 + #endif @@ -153,6 +160,10 @@ #define SENSOR_IDS_INC {} //#define SENSOR_IDS_INC { 0x83750871 } +// List of sensor IDs of the model "BRESSER 3-in-1 Professional Wind Gauge / Anemometer" +// P/N 7002531 - requiring special heandling in decodeBresser5In1Payload() +//#define SENSOR_IDS_DECODE3IN1 {} +#define SENSOR_IDS_DECODE3IN1 { 0x2C100512 } // ------------------------------------------------------------------------------------------------ // --- Debug Logging Output --- @@ -208,6 +219,48 @@ #endif +// Replacement for +// https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h +// on Arduino AVR: +#if defined(ARDUINO_ARCH_AVR) + #define ARDUHAL_LOG_LEVEL_NONE 0 + #define ARDUHAL_LOG_LEVEL_ERROR 1 + #define ARDUHAL_LOG_LEVEL_WARN 2 + #define ARDUHAL_LOG_LEVEL_INFO 3 + #define ARDUHAL_LOG_LEVEL_DEBUG 4 + #define ARDUHAL_LOG_LEVEL_VERBOSE 5 + + // Set desired level here! + #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO + + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE + #define log_e(...) { printf(__VA_ARGS__); println(); } + #else + #define log_e(...) {} + #endif + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR + #define log_w(...) { printf(__VA_ARGS__); println(); } + #else + #define log_w(...) {} + #endif + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN + #define log_i(...) { printf(__VA_ARGS__); println(); } + #else + #define log_i(...) {} + #endif + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO + #define log_d(...) { printf(__VA_ARGS__); println(); } + #else + #define log_d(...) {} + #endif + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG + #define log_v(...) { printf(__VA_ARGS__); println(); } + #else + #define log_v(...) {} + #endif +#endif + + //#define _DEBUG_MODE_ // Enable debug output (serial console) #define DEBUG_PORT Serial #if defined(_DEBUG_MODE_) @@ -349,11 +402,25 @@ // CC1101: GDO0 / RFM95W/SX127x: G0 #define PIN_RECEIVER_IRQ 4 - // CC1101: GDO2 / RFM95W/SX127x: + // CC1101: GDO2 / RFM95W/SX127x: G1 #define PIN_RECEIVER_GPIO 5 // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC #define PIN_RECEIVER_RST 2 + +#elif defined(ARDUINO_AVR_FEATHER32U4) + // Pinning for Adafruit Feather 32u4 + #define PIN_RECEIVER_CS 8 + + // CC1101: GDO0 / RFM95W/SX127x: G0 + #define PIN_RECEIVER_IRQ 7 + + // CC1101: GDO2 / RFM95W/SX127x: G1 (not used) + #define PIN_RECEIVER_GPIO 99 + + // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC + #define PIN_RECEIVER_RST 4 + #endif #define STR_HELPER(x) #x From a64f61a269b25b2a1f99086c7188748c3763168a Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Mon, 29 May 2023 19:21:08 +0200 Subject: [PATCH 11/11] Update WeatherSensorCfg.h --- .../src/WeatherSensorCfg.h | 71 ++++++++++++++++++- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/examples/BresserWeatherSensorMQTTCustom/src/WeatherSensorCfg.h b/examples/BresserWeatherSensorMQTTCustom/src/WeatherSensorCfg.h index 7becb7af..c3b47bb8 100644 --- a/examples/BresserWeatherSensorMQTTCustom/src/WeatherSensorCfg.h +++ b/examples/BresserWeatherSensorMQTTCustom/src/WeatherSensorCfg.h @@ -39,6 +39,9 @@ // 20230208 Added pin definitions for ARDUINO_TTGO_LoRa32_V2 // 20230301 Added pin definitions for Wireless_Stick (from Heltec) // 20230316 Added pin definitions for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232 +// 20230330 Added pin definitions and changes for Adafruit Feather 32u4 (AVR) RFM95 LoRa Radio +// 20230412 Added workaround for Professional Wind Gauge / Anemometer, P/N 7002531 +// 20230420 Added pin definitions for DFRobot FireBeetle ESP32 with FireBeetle Cover LoRa // // ToDo: // - @@ -127,6 +130,10 @@ #define LORAWAN_NODE #define USE_SX1276 +#elif defined(ARDUINO_AVR_FEATHER32U4) + #pragma message("ARDUINO_AVR_FEATHER32U4 defined; assuming this is the Arduino Feather 32u4 RFM95 LoRa Radio") + #define USE_SX1276 + #endif @@ -153,6 +160,10 @@ #define SENSOR_IDS_INC {} //#define SENSOR_IDS_INC { 0x83750871 } +// List of sensor IDs of the model "BRESSER 3-in-1 Professional Wind Gauge / Anemometer" +// P/N 7002531 - requiring special heandling in decodeBresser5In1Payload() +//#define SENSOR_IDS_DECODE3IN1 {} +#define SENSOR_IDS_DECODE3IN1 { 0x2C100512 } // ------------------------------------------------------------------------------------------------ // --- Debug Logging Output --- @@ -208,6 +219,48 @@ #endif +// Replacement for +// https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h +// on Arduino AVR: +#if defined(ARDUINO_ARCH_AVR) + #define ARDUHAL_LOG_LEVEL_NONE 0 + #define ARDUHAL_LOG_LEVEL_ERROR 1 + #define ARDUHAL_LOG_LEVEL_WARN 2 + #define ARDUHAL_LOG_LEVEL_INFO 3 + #define ARDUHAL_LOG_LEVEL_DEBUG 4 + #define ARDUHAL_LOG_LEVEL_VERBOSE 5 + + // Set desired level here! + #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO + + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE + #define log_e(...) { printf(__VA_ARGS__); println(); } + #else + #define log_e(...) {} + #endif + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR + #define log_w(...) { printf(__VA_ARGS__); println(); } + #else + #define log_w(...) {} + #endif + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN + #define log_i(...) { printf(__VA_ARGS__); println(); } + #else + #define log_i(...) {} + #endif + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO + #define log_d(...) { printf(__VA_ARGS__); println(); } + #else + #define log_d(...) {} + #endif + #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG + #define log_v(...) { printf(__VA_ARGS__); println(); } + #else + #define log_v(...) {} + #endif +#endif + + //#define _DEBUG_MODE_ // Enable debug output (serial console) #define DEBUG_PORT Serial #if defined(_DEBUG_MODE_) @@ -225,7 +278,7 @@ // Select appropriate sensor message format(s) #define BRESSER_5_IN_1 #define BRESSER_6_IN_1 -//#define BRESSER_7_IN_1 +#define BRESSER_7_IN_1 #if ( !defined(BRESSER_5_IN_1) && !defined(BRESSER_6_IN_1) && !defined(BRESSER_7_IN_1) ) #error "Either BRESSER_5_IN_1 and/or BRESSER_6_IN_1 and/or BRESSER_7_IN_1 must be defined!" @@ -349,11 +402,25 @@ // CC1101: GDO0 / RFM95W/SX127x: G0 #define PIN_RECEIVER_IRQ 4 - // CC1101: GDO2 / RFM95W/SX127x: + // CC1101: GDO2 / RFM95W/SX127x: G1 #define PIN_RECEIVER_GPIO 5 // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC #define PIN_RECEIVER_RST 2 + +#elif defined(ARDUINO_AVR_FEATHER32U4) + // Pinning for Adafruit Feather 32u4 + #define PIN_RECEIVER_CS 8 + + // CC1101: GDO0 / RFM95W/SX127x: G0 + #define PIN_RECEIVER_IRQ 7 + + // CC1101: GDO2 / RFM95W/SX127x: G1 (not used) + #define PIN_RECEIVER_GPIO 99 + + // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC + #define PIN_RECEIVER_RST 4 + #endif #define STR_HELPER(x) #x