From 96688e761729d730709306c1cb051d236b83cbb3 Mon Sep 17 00:00:00 2001 From: matthias-bs <83612361+matthias-bs@users.noreply.github.com> Date: Thu, 25 Apr 2024 06:20:26 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20matthias?= =?UTF-8?q?-bs/BresserWeatherSensorReceiver@4b19519aa1ac30daf6b9cd71a07b50?= =?UTF-8?q?f255f97358=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _weather_sensor_cfg_8h_source.html | 1101 ++++++++++++++-------------- 1 file changed, 551 insertions(+), 550 deletions(-) diff --git a/_weather_sensor_cfg_8h_source.html b/_weather_sensor_cfg_8h_source.html index 6902e899..aac39ce2 100644 --- a/_weather_sensor_cfg_8h_source.html +++ b/_weather_sensor_cfg_8h_source.html @@ -145,561 +145,562 @@
58 // 20240322 Added pin definitions for M5Stack Core2 with M5Stack Module LoRa868
59 // 20240415 Added pin definitions for ESP32-S3 PowerFeather with with RFM95W "FeatherWing" ADA3232
60 // 20240417 Modified SENSOR_IDS_INC
-
61 //
-
62 // ToDo:
-
63 // -
-
64 //
-
66 
-
67 #if !defined(WEATHER_SENSOR_CFG_H)
-
68 #define WEATHER_SENSOR_CFG_H
-
69 
-
70 #include <Arduino.h>
-
71 
-
72 // ------------------------------------------------------------------------------------------------
-
73 // --- Weather Sensors ---
-
74 // ------------------------------------------------------------------------------------------------
-
75 #define NUM_SENSORS 1 // Number of sensors to be received
-
76 
-
77 // List of sensor IDs to be excluded - can be empty
-
78 #define SENSOR_IDS_EXC { 0x792882A2 }
-
79 //#define SENSOR_IDS_EXC { 0x792882A2 }
-
80 
-
81 // List of sensor IDs to be included - if empty, handle all available sensors
-
82 #define SENSOR_IDS_INC { }
-
83 //#define SENSOR_IDS_INC { 0x83750871 }
-
84 
-
85 // Disable data type which will not be used to save RAM
-
86 #define WIND_DATA_FLOATINGPOINT
-
87 #define WIND_DATA_FIXEDPOINT
-
88 
-
89 // Select appropriate sensor message format(s)
-
90 // Comment out unused decoders to save operation time/power
-
91 #define BRESSER_5_IN_1
-
92 #define BRESSER_6_IN_1
-
93 #define BRESSER_7_IN_1
-
94 #define BRESSER_LIGHTNING
-
95 #define BRESSER_LEAKAGE
-
96 
+
61 // 20240425 Added define variant ARDUINO_heltec_wifi_lora_32_V3
+
62 //
+
63 // ToDo:
+
64 // -
+
65 //
+
67 
+
68 #if !defined(WEATHER_SENSOR_CFG_H)
+
69 #define WEATHER_SENSOR_CFG_H
+
70 
+
71 #include <Arduino.h>
+
72 
+
73 // ------------------------------------------------------------------------------------------------
+
74 // --- Weather Sensors ---
+
75 // ------------------------------------------------------------------------------------------------
+
76 #define NUM_SENSORS 1 // Number of sensors to be received
+
77 
+
78 // List of sensor IDs to be excluded - can be empty
+
79 #define SENSOR_IDS_EXC { 0x792882A2 }
+
80 //#define SENSOR_IDS_EXC { 0x792882A2 }
+
81 
+
82 // List of sensor IDs to be included - if empty, handle all available sensors
+
83 #define SENSOR_IDS_INC { }
+
84 //#define SENSOR_IDS_INC { 0x83750871 }
+
85 
+
86 // Disable data type which will not be used to save RAM
+
87 #define WIND_DATA_FLOATINGPOINT
+
88 #define WIND_DATA_FIXEDPOINT
+
89 
+
90 // Select appropriate sensor message format(s)
+
91 // Comment out unused decoders to save operation time/power
+
92 #define BRESSER_5_IN_1
+
93 #define BRESSER_6_IN_1
+
94 #define BRESSER_7_IN_1
+
95 #define BRESSER_LIGHTNING
+
96 #define BRESSER_LEAKAGE
97 
-
98 // ------------------------------------------------------------------------------------------------
-
99 // --- Rain Gauge / Lightning sensor data retention during deep sleep ---
-
100 // ------------------------------------------------------------------------------------------------
-
101 
-
102 #if !defined(INSIDE_UNITTEST)
-
103  #if defined(ESP32)
-
104  // Option: Comment out to save data in RTC RAM
-
105  // N.B.:
-
106  // ESP8266 has RTC RAM, too, but access is different from ESP32
-
107  // and currently not implemented here
-
108  #define RAINGAUGE_USE_PREFS
-
109  #define LIGHTNING_USE_PREFS
-
110  #else
-
111  // Using Preferences is mandatory on other architectures (e.g. RP2040)
-
112  #define RAINGAUGE_USE_PREFS
-
113  #define LIGHTNING_USE_PREFS
-
114  #endif
-
115 #endif
-
116 
-
117 // ------------------------------------------------------------------------------------------------
-
118 // --- Board ---
-
119 // ------------------------------------------------------------------------------------------------
-
120 
-
121 // LILIGO TTGO LoRaP32 board with integrated RF tranceiver (SX1276)
-
122 // See pin definitions in
-
123 // https://github.com/espressif/arduino-esp32/tree/master/variants/ttgo-lora32-*
-
124 // and
-
125 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-2/11973
-
126 
-
127 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V1 (No TFCard)"
-
128 // in the Arduino IDE:
-
129 //#define ARDUINO_TTGO_LoRa32_V1
-
130 
-
131 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2"
-
132 // in the Arduino IDE:
-
133 //#define ARDUINO_TTGO_LoRa32_V2
-
134 
-
135 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2.1 (1.6.1)"
-
136 // in the Arduino IDE:
-
137 //#define ARDUINO_TTGO_LoRa32_V21new
-
138 
-
139 // Heltec Wireless Stick
-
140 // V2 -> SX1276
-
141 // V3 -> SX1262
-
142 // THERE IS NO WAY TO DISTINGUISH THE VERSION AUTOMATICALLY!
-
143 //
-
144 // This define is set by selecting "Board: Heltec Wireless Stick"
-
145 // in the Arduino IDE:
-
146 //#define ARDUINO_heltec_wireless_stick
-
147 
-
148 // This define is set by selecting "Board: Heltec WiFi LoRa 32(V2)"
-
149 // in the Adruino IDE:
-
150 //#define ARDUINO_heltec_wifi_lora_32_V2
-
151 
-
152 // Adafruit Feather ESP32S2 with RFM95W "FeatherWing" ADA3232
-
153 // https://github.com/espressif/arduino-esp32/blob/master/variants/adafruit_feather_esp32s2/pins_arduino.h
-
154 //
-
155 // This define is set by selecting "Adafruit Feather ESP32-S2" in the Arduino IDE:
-
156 //#define ARDUINO_ADAFRUIT_FEATHER_ESP32S2
-
157 
-
158 // Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
-
159 // https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
-
160 //
-
161 // This define is set by selecting "Adafruit ESP32 Feather" in the Arduino IDE:
-
162 //#define ARDUINO_FEATHER_ESP32
-
163 
-
164 // Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
-
165 // https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
-
166 //
-
167 // This define is set by selecting "Adafruit Feather RP2040" in the Arduino IDE:
-
168 //#define ARDUINO_ADAFRUIT_FEATHER_RP2040
-
169 
-
170 // DFRobot Firebeetle32
-
171 // https://github.com/espressif/arduino-esp32/tree/master/variants/firebeetle32/pins_arduino.h
-
172 //
-
173 // This define (not very specific...) is set by selecting "FireBeetle-ESP32" in the Arduino IDE:
-
174 //#define ARDUINO_ESP32_DEV
-
175 
-
176 // M5Stack Core2
-
177 // https://github.com/espressif/arduino-esp32/blob/master/variants/m5stack_core2/pins_arduino.h
-
178 //
-
179 // This define is set by selecting "M5Core2" in the Arduino IDE
-
180 //#define ARDUINO_M5STACK_CORE2
-
181 
-
182 #if defined(ARDUINO_TTGO_LoRa32_V1)
-
183  #pragma message("ARDUINO_TTGO_LoRa32_V1 defined; using on-board transceiver")
-
184  #define USE_SX1276
-
185 
-
186 #elif defined(ARDUINO_TTGO_LoRa32_V2)
-
187  #pragma message("ARDUINO_TTGO_LoRa32_V2 defined; using on-board transceiver")
-
188  #pragma message("Wiring required for LMIC: DIO1 to GPIO33")
-
189  #define USE_SX1276
-
190 
-
191 #elif defined(ARDUINO_TTGO_LoRa32_v21new)
-
192  #pragma message("ARDUINO_TTGO_LoRa32_V21new defined; using on-board transceiver")
-
193  #define USE_SX1276
-
194 
-
195 #elif defined(ARDUINO_heltec_wireless_stick)
-
196  #pragma message("ARDUINO_heltec_wireless_stick defined; using on-board transceiver")
-
197  #pragma message("Radio transceiver chip has to be configured manually: V2 -> USE_SX1276 / V3 -> USE_SX1262")
-
198  //#define USE_SX1276 // Heltec Wireless Stick V2
-
199  #define USE_SX1262 // Heltec Wireless Stick V3
-
200 
-
201 #elif defined(ARDUINO_heltec_wireless_stick_v2)
-
202  #pragma message("ARDUINO_heltec_wireless_stick_v2 defined; using on-board transceiver")
-
203  #define USE_SX1276
-
204 
-
205 #elif defined(ARDUINO_heltec_wireless_stick_v3)
-
206  #pragma message("ARDUINO_heltec_wireless_stick_v3 defined; using on-board transceiver")
-
207  #define USE_SX1262
-
208 
-
209 #elif defined(ARDUINO_heltec_wifi_lora_32_V2)
-
210  #pragma message("ARDUINO_heltec_wifi_lora_32_V2 defined; using on-board transceiver")
-
211  #define USE_SX1276
-
212 
-
213 #elif defined(ARDUINO_heltec_wifi_32_lora_V3)
-
214  #pragma message("ARDUINO_heltec_wifi_32_lora_V3 defined; using on-board transceiver")
-
215  #define USE_SX1262
-
216 
-
217 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
-
218  #pragma message("ARDUINO_ADAFRUIT_FEATHER_ESP32S2 defined; assuming RFM95W FeatherWing will be used")
-
219  #define USE_SX1276
-
220 
-
221 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
-
222  #pragma message("ARDUINO_ADAFRUIT_FEATHER_ESP32_V2 defined; assuming RFM95W FeatherWing will be used")
-
223  #define USE_SX1276
-
224  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
-
225 
-
226 #elif defined(ARDUINO_FEATHER_ESP32)
-
227  #pragma message("ARDUINO_FEATHER_ESP32 defined; assuming RFM95W FeatherWing will be used")
-
228  #define USE_SX1276
-
229  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
-
230 
-
231 #elif defined(ARDUINO_M5STACK_CORE2) || defined(ARDUINO_M5STACK_Core2)
-
232  // Note: Depending on board package file date, either variant is used -
-
233  // see https://github.com/espressif/arduino-esp32/issues/9423!
-
234  #pragma message("ARDUINO_M5STACK_CORE2 defined; assuming M5Stack Module LoRa868 will be used")
-
235  #define USE_SX1276
-
236  #pragma message("Wiring required for LMIC: DIO1 to GPIO35")
-
237 
-
238 #elif defined(ARDUINO_ESP32S3_POWERFEATHER)
-
239  #pragma message("ARDUINO_ESP32S3_POWERFEATHER defined; assuming RFM95W FeatherWing will be used")
-
240  #define USE_SX1276
-
241  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
-
242 
-
243 #elif defined(ARDUINO_AVR_FEATHER32U4)
-
244  #pragma message("ARDUINO_AVR_FEATHER32U4 defined; assuming this is the Adafruit Feather 32u4 RFM95 LoRa Radio")
-
245  #define USE_SX1276
-
246 
-
247 #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
248  #pragma message("ARDUINO_ADAFRUIT_FEATHER_RP2040 defined; assuming RFM95W FeatherWing will be used")
-
249  #define USE_SX1276
-
250  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
-
251 
-
252 #elif defined(ARDUINO_ESP32_DEV) || defined(ARDUINO_DFROBOT_FIREBEETLE_ESP32)
-
253  //#define LORAWAN_NODE
-
254  #define FIREBEETLE_ESP32_COVER_LORA
-
255 
-
256  #if defined(FIREBEETLE_ESP32_COVER_LORA)
-
257  #pragma message("FIREBEETLE_ESP32_COVER_LORA defined; assuming this is a FireBeetle ESP32 with FireBeetle Cover LoRa")
-
258  #define USE_SX1276
-
259  #pragma message("Required wiring: D2 to RESET, D3 to DIO0, D4 to CS, D5 to DIO1")
-
260 
-
261  #elif defined(LORAWAN_NODE)
-
262  #pragma message("LORAWAN_NODE defined; assuming this is the LoRaWAN_Node board (DFRobot Firebeetle32 + Adafruit RFM95W LoRa Radio)")
-
263  #define USE_SX1276
-
264 
-
265  #else
-
266  #pragma message("ARDUINO_ESP32_DEV defined; if you use one of those boards, select either LORAWAN_NODE or FIREBEETLE_ESP32_COVER_LORA manually!")
-
267 
-
268  #endif
-
269 #endif
-
270 
+
98 
+
99 // ------------------------------------------------------------------------------------------------
+
100 // --- Rain Gauge / Lightning sensor data retention during deep sleep ---
+
101 // ------------------------------------------------------------------------------------------------
+
102 
+
103 #if !defined(INSIDE_UNITTEST)
+
104  #if defined(ESP32)
+
105  // Option: Comment out to save data in RTC RAM
+
106  // N.B.:
+
107  // ESP8266 has RTC RAM, too, but access is different from ESP32
+
108  // and currently not implemented here
+
109  #define RAINGAUGE_USE_PREFS
+
110  #define LIGHTNING_USE_PREFS
+
111  #else
+
112  // Using Preferences is mandatory on other architectures (e.g. RP2040)
+
113  #define RAINGAUGE_USE_PREFS
+
114  #define LIGHTNING_USE_PREFS
+
115  #endif
+
116 #endif
+
117 
+
118 // ------------------------------------------------------------------------------------------------
+
119 // --- Board ---
+
120 // ------------------------------------------------------------------------------------------------
+
121 
+
122 // LILIGO TTGO LoRaP32 board with integrated RF tranceiver (SX1276)
+
123 // See pin definitions in
+
124 // https://github.com/espressif/arduino-esp32/tree/master/variants/ttgo-lora32-*
+
125 // and
+
126 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-2/11973
+
127 
+
128 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V1 (No TFCard)"
+
129 // in the Arduino IDE:
+
130 //#define ARDUINO_TTGO_LoRa32_V1
+
131 
+
132 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2"
+
133 // in the Arduino IDE:
+
134 //#define ARDUINO_TTGO_LoRa32_V2
+
135 
+
136 // This define is set by selecting "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2.1 (1.6.1)"
+
137 // in the Arduino IDE:
+
138 //#define ARDUINO_TTGO_LoRa32_V21new
+
139 
+
140 // Heltec Wireless Stick
+
141 // V2 -> SX1276
+
142 // V3 -> SX1262
+
143 // THERE IS NO WAY TO DISTINGUISH THE VERSION AUTOMATICALLY!
+
144 //
+
145 // This define is set by selecting "Board: Heltec Wireless Stick"
+
146 // in the Arduino IDE:
+
147 //#define ARDUINO_heltec_wireless_stick
+
148 
+
149 // This define is set by selecting "Board: Heltec WiFi LoRa 32(V2)"
+
150 // in the Adruino IDE:
+
151 //#define ARDUINO_heltec_wifi_lora_32_V2
+
152 
+
153 // Adafruit Feather ESP32S2 with RFM95W "FeatherWing" ADA3232
+
154 // https://github.com/espressif/arduino-esp32/blob/master/variants/adafruit_feather_esp32s2/pins_arduino.h
+
155 //
+
156 // This define is set by selecting "Adafruit Feather ESP32-S2" in the Arduino IDE:
+
157 //#define ARDUINO_ADAFRUIT_FEATHER_ESP32S2
+
158 
+
159 // Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
+
160 // https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
+
161 //
+
162 // This define is set by selecting "Adafruit ESP32 Feather" in the Arduino IDE:
+
163 //#define ARDUINO_FEATHER_ESP32
+
164 
+
165 // Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
+
166 // https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
+
167 //
+
168 // This define is set by selecting "Adafruit Feather RP2040" in the Arduino IDE:
+
169 //#define ARDUINO_ADAFRUIT_FEATHER_RP2040
+
170 
+
171 // DFRobot Firebeetle32
+
172 // https://github.com/espressif/arduino-esp32/tree/master/variants/firebeetle32/pins_arduino.h
+
173 //
+
174 // This define (not very specific...) is set by selecting "FireBeetle-ESP32" in the Arduino IDE:
+
175 //#define ARDUINO_ESP32_DEV
+
176 
+
177 // M5Stack Core2
+
178 // https://github.com/espressif/arduino-esp32/blob/master/variants/m5stack_core2/pins_arduino.h
+
179 //
+
180 // This define is set by selecting "M5Core2" in the Arduino IDE
+
181 //#define ARDUINO_M5STACK_CORE2
+
182 
+
183 #if defined(ARDUINO_TTGO_LoRa32_V1)
+
184  #pragma message("ARDUINO_TTGO_LoRa32_V1 defined; using on-board transceiver")
+
185  #define USE_SX1276
+
186 
+
187 #elif defined(ARDUINO_TTGO_LoRa32_V2)
+
188  #pragma message("ARDUINO_TTGO_LoRa32_V2 defined; using on-board transceiver")
+
189  #pragma message("Wiring required for LMIC: DIO1 to GPIO33")
+
190  #define USE_SX1276
+
191 
+
192 #elif defined(ARDUINO_TTGO_LoRa32_v21new)
+
193  #pragma message("ARDUINO_TTGO_LoRa32_V21new defined; using on-board transceiver")
+
194  #define USE_SX1276
+
195 
+
196 #elif defined(ARDUINO_heltec_wireless_stick)
+
197  #pragma message("ARDUINO_heltec_wireless_stick defined; using on-board transceiver")
+
198  #pragma message("Radio transceiver chip has to be configured manually: V2 -> USE_SX1276 / V3 -> USE_SX1262")
+
199  //#define USE_SX1276 // Heltec Wireless Stick V2
+
200  #define USE_SX1262 // Heltec Wireless Stick V3
+
201 
+
202 #elif defined(ARDUINO_heltec_wireless_stick_v2)
+
203  #pragma message("ARDUINO_heltec_wireless_stick_v2 defined; using on-board transceiver")
+
204  #define USE_SX1276
+
205 
+
206 #elif defined(ARDUINO_heltec_wireless_stick_v3)
+
207  #pragma message("ARDUINO_heltec_wireless_stick_v3 defined; using on-board transceiver")
+
208  #define USE_SX1262
+
209 
+
210 #elif defined(ARDUINO_heltec_wifi_lora_32_V2)
+
211  #pragma message("ARDUINO_heltec_wifi_lora_32_V2 defined; using on-board transceiver")
+
212  #define USE_SX1276
+
213 
+
214 #elif defined(ARDUINO_heltec_wifi_32_lora_V3) || defined(ARDUINO_heltec_wifi_lora_32_V3)
+
215  #pragma message("ARDUINO_heltec_wifi_32_lora_V3 (or similar) defined; using on-board transceiver")
+
216  #define USE_SX1262
+
217 
+
218 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
+
219  #pragma message("ARDUINO_ADAFRUIT_FEATHER_ESP32S2 defined; assuming RFM95W FeatherWing will be used")
+
220  #define USE_SX1276
+
221 
+
222 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
+
223  #pragma message("ARDUINO_ADAFRUIT_FEATHER_ESP32_V2 defined; assuming RFM95W FeatherWing will be used")
+
224  #define USE_SX1276
+
225  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
+
226 
+
227 #elif defined(ARDUINO_FEATHER_ESP32)
+
228  #pragma message("ARDUINO_FEATHER_ESP32 defined; assuming RFM95W FeatherWing will be used")
+
229  #define USE_SX1276
+
230  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
+
231 
+
232 #elif defined(ARDUINO_M5STACK_CORE2) || defined(ARDUINO_M5STACK_Core2)
+
233  // Note: Depending on board package file date, either variant is used -
+
234  // see https://github.com/espressif/arduino-esp32/issues/9423!
+
235  #pragma message("ARDUINO_M5STACK_CORE2 defined; assuming M5Stack Module LoRa868 will be used")
+
236  #define USE_SX1276
+
237  #pragma message("Wiring required for LMIC: DIO1 to GPIO35")
+
238 
+
239 #elif defined(ARDUINO_ESP32S3_POWERFEATHER)
+
240  #pragma message("ARDUINO_ESP32S3_POWERFEATHER defined; assuming RFM95W FeatherWing will be used")
+
241  #define USE_SX1276
+
242  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
+
243 
+
244 #elif defined(ARDUINO_AVR_FEATHER32U4)
+
245  #pragma message("ARDUINO_AVR_FEATHER32U4 defined; assuming this is the Adafruit Feather 32u4 RFM95 LoRa Radio")
+
246  #define USE_SX1276
+
247 
+
248 #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
249  #pragma message("ARDUINO_ADAFRUIT_FEATHER_RP2040 defined; assuming RFM95W FeatherWing will be used")
+
250  #define USE_SX1276
+
251  #pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
+
252 
+
253 #elif defined(ARDUINO_ESP32_DEV) || defined(ARDUINO_DFROBOT_FIREBEETLE_ESP32)
+
254  //#define LORAWAN_NODE
+
255  #define FIREBEETLE_ESP32_COVER_LORA
+
256 
+
257  #if defined(FIREBEETLE_ESP32_COVER_LORA)
+
258  #pragma message("FIREBEETLE_ESP32_COVER_LORA defined; assuming this is a FireBeetle ESP32 with FireBeetle Cover LoRa")
+
259  #define USE_SX1276
+
260  #pragma message("Required wiring: D2 to RESET, D3 to DIO0, D4 to CS, D5 to DIO1")
+
261 
+
262  #elif defined(LORAWAN_NODE)
+
263  #pragma message("LORAWAN_NODE defined; assuming this is the LoRaWAN_Node board (DFRobot Firebeetle32 + Adafruit RFM95W LoRa Radio)")
+
264  #define USE_SX1276
+
265 
+
266  #else
+
267  #pragma message("ARDUINO_ESP32_DEV defined; if you use one of those boards, select either LORAWAN_NODE or FIREBEETLE_ESP32_COVER_LORA manually!")
+
268 
+
269  #endif
+
270 #endif
271 
-
272 // ------------------------------------------------------------------------------------------------
-
273 // --- Radio Transceiver ---
-
274 // ------------------------------------------------------------------------------------------------
-
275 // Select type of receiver module (if not yet defined based on the assumptions above)
-
276 #if ( !defined(USE_CC1101) && !defined(USE_SX1276) && !defined(USE_SX1262) )
-
277  //#define USE_CC1101
-
278  #define USE_SX1276
-
279  //#define USE_SX1262
-
280 #endif
-
281 
+
272 
+
273 // ------------------------------------------------------------------------------------------------
+
274 // --- Radio Transceiver ---
+
275 // ------------------------------------------------------------------------------------------------
+
276 // Select type of receiver module (if not yet defined based on the assumptions above)
+
277 #if ( !defined(USE_CC1101) && !defined(USE_SX1276) && !defined(USE_SX1262) )
+
278  //#define USE_CC1101
+
279  #define USE_SX1276
+
280  //#define USE_SX1262
+
281 #endif
282 
-
283 // ------------------------------------------------------------------------------------------------
-
284 // --- Debug Logging Output ---
-
285 // ------------------------------------------------------------------------------------------------
-
286 // - ESP32:
-
287 // CORE_DEBUG_LEVEL is set in Adruino IDE:
-
288 // Tools->Core Debug Level: "<None>|<Error>|<Warning>|<Info>|<Debug>|<Verbose>"
-
289 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
-
290 //
-
291 // - ESP8266:
-
292 // DEBUG_ESP_PORT is set in Arduino IDE:
-
293 // Tools->Debug port: "<None>|<Serial>|<Serial1>"
-
294 //
-
295 // - RP2040:
-
296 // DEBUG_RP2040_PORT is set in Arduino IDE:
-
297 // Tools->Debug port: "<Disabled>|<Serial>|<Serial1>|<Serial2>"
-
298 //
-
299 // Replacement for
-
300 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
-
301 // on ESP8266 and RP2040:
-
302 #if defined(ESP8266) || defined(ARDUINO_ARCH_RP2040)
-
303  #define ARDUHAL_LOG_LEVEL_NONE 0
-
304  #define ARDUHAL_LOG_LEVEL_ERROR 1
-
305  #define ARDUHAL_LOG_LEVEL_WARN 2
-
306  #define ARDUHAL_LOG_LEVEL_INFO 3
-
307  #define ARDUHAL_LOG_LEVEL_DEBUG 4
-
308  #define ARDUHAL_LOG_LEVEL_VERBOSE 5
-
309 
-
310  #if defined(ARDUINO_ARCH_RP2040) && defined(DEBUG_RP2040_PORT)
-
311  #define DEBUG_PORT DEBUG_RP2040_PORT
-
312  #elif defined(DEBUG_ESP_PORT)
-
313  #define DEBUG_PORT DEBUG_ESP_PORT
-
314  #endif
-
315 
-
316  // Set desired level here!
-
317  #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO
-
318 
-
319  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
-
320  #define log_e(...) { DEBUG_PORT.printf("%s(), l.%d: ",__func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
321  #else
-
322  #define log_e(...) {}
-
323  #endif
-
324  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR
-
325  #define log_w(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
326  #else
-
327  #define log_w(...) {}
-
328  #endif
-
329  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN
-
330  #define log_i(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
331  #else
-
332  #define log_i(...) {}
-
333  #endif
-
334  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO
-
335  #define log_d(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
336  #else
-
337  #define log_d(...) {}
-
338  #endif
-
339  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG
-
340  #define log_v(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
-
341  #else
-
342  #define log_v(...) {}
-
343  #endif
-
344 
-
345 #endif
-
346 
+
283 
+
284 // ------------------------------------------------------------------------------------------------
+
285 // --- Debug Logging Output ---
+
286 // ------------------------------------------------------------------------------------------------
+
287 // - ESP32:
+
288 // CORE_DEBUG_LEVEL is set in Adruino IDE:
+
289 // Tools->Core Debug Level: "<None>|<Error>|<Warning>|<Info>|<Debug>|<Verbose>"
+
290 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
+
291 //
+
292 // - ESP8266:
+
293 // DEBUG_ESP_PORT is set in Arduino IDE:
+
294 // Tools->Debug port: "<None>|<Serial>|<Serial1>"
+
295 //
+
296 // - RP2040:
+
297 // DEBUG_RP2040_PORT is set in Arduino IDE:
+
298 // Tools->Debug port: "<Disabled>|<Serial>|<Serial1>|<Serial2>"
+
299 //
+
300 // Replacement for
+
301 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
+
302 // on ESP8266 and RP2040:
+
303 #if defined(ESP8266) || defined(ARDUINO_ARCH_RP2040)
+
304  #define ARDUHAL_LOG_LEVEL_NONE 0
+
305  #define ARDUHAL_LOG_LEVEL_ERROR 1
+
306  #define ARDUHAL_LOG_LEVEL_WARN 2
+
307  #define ARDUHAL_LOG_LEVEL_INFO 3
+
308  #define ARDUHAL_LOG_LEVEL_DEBUG 4
+
309  #define ARDUHAL_LOG_LEVEL_VERBOSE 5
+
310 
+
311  #if defined(ARDUINO_ARCH_RP2040) && defined(DEBUG_RP2040_PORT)
+
312  #define DEBUG_PORT DEBUG_RP2040_PORT
+
313  #elif defined(DEBUG_ESP_PORT)
+
314  #define DEBUG_PORT DEBUG_ESP_PORT
+
315  #endif
+
316 
+
317  // Set desired level here!
+
318  #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO
+
319 
+
320  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
+
321  #define log_e(...) { DEBUG_PORT.printf("%s(), l.%d: ",__func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
322  #else
+
323  #define log_e(...) {}
+
324  #endif
+
325  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR
+
326  #define log_w(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
327  #else
+
328  #define log_w(...) {}
+
329  #endif
+
330  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN
+
331  #define log_i(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
332  #else
+
333  #define log_i(...) {}
+
334  #endif
+
335  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO
+
336  #define log_d(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
337  #else
+
338  #define log_d(...) {}
+
339  #endif
+
340  #if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG
+
341  #define log_v(...) { DEBUG_PORT.printf("%s(), l.%d: ", __func__, __LINE__); DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
+
342  #else
+
343  #define log_v(...) {}
+
344  #endif
+
345 
+
346 #endif
347 
-
348 // Replacement for
-
349 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
-
350 // on Arduino AVR:
-
351 #if defined(ARDUINO_ARCH_AVR)
-
352  #define ARDUHAL_LOG_LEVEL_NONE 0
-
353  #define ARDUHAL_LOG_LEVEL_ERROR 1
-
354  #define ARDUHAL_LOG_LEVEL_WARN 2
-
355  #define ARDUHAL_LOG_LEVEL_INFO 3
-
356  #define ARDUHAL_LOG_LEVEL_DEBUG 4
-
357  #define ARDUHAL_LOG_LEVEL_VERBOSE 5
-
358 
-
359  // Set desired level here!
-
360  #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO
-
361 
-
362  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
-
363  #define log_e(...) { printf(__VA_ARGS__); println(); }
-
364  #else
-
365  #define log_e(...) {}
-
366  #endif
-
367  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR
-
368  #define log_w(...) { printf(__VA_ARGS__); println(); }
-
369  #else
-
370  #define log_w(...) {}
-
371  #endif
-
372  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN
-
373  #define log_i(...) { printf(__VA_ARGS__); println(); }
-
374  #else
-
375  #define log_i(...) {}
-
376  #endif
-
377  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO
-
378  #define log_d(...) { printf(__VA_ARGS__); println(); }
-
379  #else
-
380  #define log_d(...) {}
-
381  #endif
-
382  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG
-
383  #define log_v(...) { printf(__VA_ARGS__); println(); }
-
384  #else
-
385  #define log_v(...) {}
-
386  #endif
-
387 #endif
-
388 
-
389 #if ( (defined(USE_CC1101) && defined(USE_SX1276)) || \
-
390  (defined(USE_SX1276) && defined(USE_SX1262)) || \
-
391  (defined(USE_SX1262) && defined(USE_CC1101)) )
-
392  #error "Either USE_CC1101 OR USE_SX1276 OR USE_SX1262 must be defined!"
-
393 #endif
-
394 
-
395 #if defined(USE_CC1101)
-
396  #define RECEIVER_CHIP "[CC1101]"
-
397 #elif defined(USE_SX1276)
-
398  #define RECEIVER_CHIP "[SX1276]"
-
399 #elif defined(USE_SX1262)
-
400  #define RECEIVER_CHIP "[SX1262]"
-
401 #else
-
402  #error "Either USE_CC1101, USE_SX1276 or USE_SX1262 must be defined!"
-
403 #endif
-
404 
+
348 
+
349 // Replacement for
+
350 // https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h
+
351 // on Arduino AVR:
+
352 #if defined(ARDUINO_ARCH_AVR)
+
353  #define ARDUHAL_LOG_LEVEL_NONE 0
+
354  #define ARDUHAL_LOG_LEVEL_ERROR 1
+
355  #define ARDUHAL_LOG_LEVEL_WARN 2
+
356  #define ARDUHAL_LOG_LEVEL_INFO 3
+
357  #define ARDUHAL_LOG_LEVEL_DEBUG 4
+
358  #define ARDUHAL_LOG_LEVEL_VERBOSE 5
+
359 
+
360  // Set desired level here!
+
361  #define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_INFO
+
362 
+
363  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
+
364  #define log_e(...) { printf(__VA_ARGS__); println(); }
+
365  #else
+
366  #define log_e(...) {}
+
367  #endif
+
368  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_ERROR
+
369  #define log_w(...) { printf(__VA_ARGS__); println(); }
+
370  #else
+
371  #define log_w(...) {}
+
372  #endif
+
373  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_WARN
+
374  #define log_i(...) { printf(__VA_ARGS__); println(); }
+
375  #else
+
376  #define log_i(...) {}
+
377  #endif
+
378  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_INFO
+
379  #define log_d(...) { printf(__VA_ARGS__); println(); }
+
380  #else
+
381  #define log_d(...) {}
+
382  #endif
+
383  #if defined(DEBUG_ESP_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_DEBUG
+
384  #define log_v(...) { printf(__VA_ARGS__); println(); }
+
385  #else
+
386  #define log_v(...) {}
+
387  #endif
+
388 #endif
+
389 
+
390 #if ( (defined(USE_CC1101) && defined(USE_SX1276)) || \
+
391  (defined(USE_SX1276) && defined(USE_SX1262)) || \
+
392  (defined(USE_SX1262) && defined(USE_CC1101)) )
+
393  #error "Either USE_CC1101 OR USE_SX1276 OR USE_SX1262 must be defined!"
+
394 #endif
+
395 
+
396 #if defined(USE_CC1101)
+
397  #define RECEIVER_CHIP "[CC1101]"
+
398 #elif defined(USE_SX1276)
+
399  #define RECEIVER_CHIP "[SX1276]"
+
400 #elif defined(USE_SX1262)
+
401  #define RECEIVER_CHIP "[SX1262]"
+
402 #else
+
403  #error "Either USE_CC1101, USE_SX1276 or USE_SX1262 must be defined!"
+
404 #endif
405 
-
406 // Arduino default SPI pins
-
407 //
-
408 // Board SCK MOSI MISO
-
409 // ESP8266 D5 D7 D6
-
410 // ESP32 D18 D23 D19
-
411 #if defined(LORAWAN_NODE)
-
412  // Use pinning for LoRaWAN_Node (https://github.com/matthias-bs/LoRaWAN_Node)
-
413  #define PIN_RECEIVER_CS 14
-
414 
-
415  // CC1101: GDO0 / RFM95W/SX127x: G0
-
416  #define PIN_RECEIVER_IRQ 4
-
417 
-
418  // CC1101: GDO2 / RFM95W/SX127x: G1
-
419  #define PIN_RECEIVER_GPIO 16
-
420 
-
421  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
422  #define PIN_RECEIVER_RST 12
-
423 
-
424 #elif defined(FIREBEETLE_ESP32_COVER_LORA)
-
425  #define PIN_RECEIVER_CS 27 // D4
-
426 
-
427  // CC1101: GDO0 / RFM95W/SX127x: G0
-
428  #define PIN_RECEIVER_IRQ 26 // D3
-
429 
-
430  // CC1101: GDO2 / RFM95W/SX127x: G1
-
431  #define PIN_RECEIVER_GPIO 9 // D5
-
432 
-
433  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
434  #define PIN_RECEIVER_RST 25 // D2
-
435 
-
436 #elif defined(ARDUINO_TTGO_LoRa32_V1) || defined(ARDUINO_TTGO_LoRa32_V2)
-
437  // Use pinning for LILIGO TTGO LoRa32-OLED
-
438  #define PIN_RECEIVER_CS LORA_CS
-
439 
-
440  // CC1101: GDO0 / RFM95W/SX127x: G0
-
441  #define PIN_RECEIVER_IRQ LORA_IRQ
-
442 
-
443  // CC1101: GDO2 / RFM95W/SX127x: G1
-
444  // n.c. on v1/v2?, LORA_D1 on v21
-
445  #define PIN_RECEIVER_GPIO 33
-
446 
-
447  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
448  #define PIN_RECEIVER_RST LORA_RST
-
449 
-
450 #elif defined(ARDUINO_TTGO_LoRa32_v21new)
-
451  // Use pinning for LILIGO TTGO LoRa32-OLED V2.1 (1.6.1)
-
452  // Same pinout for Heltec Wireless Stick
-
453  #define PIN_RECEIVER_CS LORA_CS
-
454 
-
455  // CC1101: GDO0 / RFM95W/SX127x: G0
-
456  #define PIN_RECEIVER_IRQ LORA_IRQ
-
457 
-
458  // CC1101: GDO2 / RFM95W/SX127x: G1
-
459  #define PIN_RECEIVER_GPIO LORA_D1
-
460 
-
461  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
462  #define PIN_RECEIVER_RST LORA_RST
-
463 
-
464 #elif defined(ARDUINO_heltec_wireless_stick) || defined(ARDUINO_heltec_wifi_lora_32_V2)
-
465  // Use pinning for Heltec Wireless Stick or WiFi LoRa32 V2, respectively
-
466  #define PIN_RECEIVER_CS SS
-
467 
-
468  // CC1101: GDO0 / RFM95W/SX127x: G0
-
469  #define PIN_RECEIVER_IRQ DIO0
-
470 
-
471  // CC1101: GDO2 / RFM95W/SX127x: G1
-
472  #define PIN_RECEIVER_GPIO DIO1
-
473 
-
474  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
475  #define PIN_RECEIVER_RST RST_LoRa
-
476 
-
477 #elif defined(ARDUINO_heltec_wifi_32_lora_V3)
-
478  // Use pinning for Heltec WiFi LoRa32 V3
-
479  #define PIN_RECEIVER_CS SS
-
480 
-
481  // CC1101: GDO0 / RFM95W/SX127x: G0 / SX1262: DIO0
-
482  #define PIN_RECEIVER_IRQ DIO0
-
483 
-
484  // CC1101: GDO2 / RFM95W/SX127x: G1 / SX1262: BUSY
-
485  #define PIN_RECEIVER_GPIO BUSY_LoRa
-
486 
-
487  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
488  #define PIN_RECEIVER_RST RST_LoRa
-
489 
-
490 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
-
491  // Use pinning for Adafruit Feather ESP32S2 with RFM95W "FeatherWing" ADA3232
-
492  #define PIN_RECEIVER_CS 6
-
493 
-
494  // CC1101: GDO0 / RFM95W/SX127x: G0
-
495  #define PIN_RECEIVER_IRQ 5
-
496 
-
497  // CC1101: GDO2 / RFM95W/SX127x: G1
-
498  #define PIN_RECEIVER_GPIO 11
-
499 
-
500  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
501  #define PIN_RECEIVER_RST 9
-
502 
-
503 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
-
504  // Use pinning for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
-
505  #define PIN_RECEIVER_CS 14
-
506 
-
507  // CC1101: GDO0 / RFM95W/SX127x: G0
-
508  #define PIN_RECEIVER_IRQ 32
-
509 
-
510  // CC1101: GDO2 / RFM95W/SX127x: G1
-
511  #define PIN_RECEIVER_GPIO 33
-
512 
-
513  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
514  #define PIN_RECEIVER_RST 27
-
515 
-
516 #elif defined(ARDUINO_FEATHER_ESP32)
-
517  // Use pinning for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
-
518  #define PIN_RECEIVER_CS 14
-
519 
-
520  // CC1101: GDO0 / RFM95W/SX127x: G0
-
521  #define PIN_RECEIVER_IRQ 32
-
522 
-
523  // CC1101: GDO2 / RFM95W/SX127x: G1
-
524  #define PIN_RECEIVER_GPIO 33
-
525 
-
526  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
527  #define PIN_RECEIVER_RST 27
-
528 
-
529 #elif defined(ARDUINO_M5STACK_CORE2) || defined(ARDUINO_M5STACK_Core2)
-
530  // Note: Depending on board package file date, either variant is used -
-
531  // see https://github.com/espressif/arduino-esp32/issues/9423!
-
532  // Use pinning for M5Stack Core2 with M5Stack Module LoRa868
-
533  #define PIN_RECEIVER_CS 33
-
534 
-
535  // CC1101: GDO0 / RFM95W/SX127x: G0
-
536  #define PIN_RECEIVER_IRQ 36
-
537 
-
538  // CC1101: GDO2 / RFM95W/SX127x: G1
-
539  #define PIN_RECEIVER_GPIO 35
-
540 
-
541  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
542  #define PIN_RECEIVER_RST 26
-
543 
-
544 #elif defined(ARDUINO_ESP32S3_POWERFEATHER)
-
545  // Use pinning for ESP32-S3 PowerFeather with RFM95W "FeatherWing" ADA3232
-
546  #define PIN_RECEIVER_CS 15
-
547 
-
548  // CC1101: GDO0 / RFM95W/SX127x: G0
-
549  #define PIN_RECEIVER_IRQ 16
-
550 
-
551  // CC1101: GDO2 / RFM95W/SX127x: G1
-
552  #define PIN_RECEIVER_GPIO 18
-
553 
-
554  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
555  #define PIN_RECEIVER_RST 45
-
556 
-
557 #elif defined(ESP32)
-
558  // Generic pinning for ESP32 development boards
-
559  #define PIN_RECEIVER_CS 27
-
560 
-
561  // CC1101: GDO0 / RFM95W/SX127x: G0
-
562  #define PIN_RECEIVER_IRQ 21
-
563 
-
564  // CC1101: GDO2 / RFM95W/SX127x: G1
-
565  #define PIN_RECEIVER_GPIO 33
-
566 
-
567  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
568  #define PIN_RECEIVER_RST 32
-
569 
-
570 #elif defined(ESP8266)
-
571  // Generic pinning for ESP8266 development boards (e.g. LOLIN/WEMOS D1 mini)
-
572  #define PIN_RECEIVER_CS 15
-
573 
-
574  // CC1101: GDO0 / RFM95W/SX127x: G0
-
575  #define PIN_RECEIVER_IRQ 4
-
576 
-
577  // CC1101: GDO2 / RFM95W/SX127x: G1
-
578  #define PIN_RECEIVER_GPIO 5
-
579 
-
580  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
581  #define PIN_RECEIVER_RST 2
-
582 
-
583 #elif defined(ARDUINO_AVR_FEATHER32U4)
-
584  // Pinning for Adafruit Feather 32u4
-
585  #define PIN_RECEIVER_CS 8
-
586 
-
587  // CC1101: GDO0 / RFM95W/SX127x: G0
-
588  #define PIN_RECEIVER_IRQ 7
-
589 
-
590  // CC1101: GDO2 / RFM95W/SX127x: G1 (not used)
-
591  #define PIN_RECEIVER_GPIO 99
-
592 
-
593  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
594  #define PIN_RECEIVER_RST 4
-
595 
-
596 #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
597  // Use pinning for Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
-
598  #define PIN_RECEIVER_CS 7
-
599 
-
600  // CC1101: GDO0 / RFM95W/SX127x: G0
-
601  #define PIN_RECEIVER_IRQ 8
-
602 
-
603  // CC1101: GDO2 / RFM95W/SX127x: G1 (not used)
-
604  #define PIN_RECEIVER_GPIO 10
-
605 
-
606  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
-
607  #define PIN_RECEIVER_RST 11
-
608 
-
609 #endif
-
610 
-
611 #define STR_HELPER(x) #x
-
612 #define STR(x) STR_HELPER(x)
-
613 #pragma message("Receiver chip: " RECEIVER_CHIP)
-
614 #pragma message("Pin config: RST->" STR(PIN_RECEIVER_RST) ", CS->" STR(PIN_RECEIVER_CS) ", GD0/G0/IRQ->" STR(PIN_RECEIVER_IRQ) ", GDO2/G1/GPIO->" STR(PIN_RECEIVER_GPIO) )
-
615 
-
616 #endif
+
406 
+
407 // Arduino default SPI pins
+
408 //
+
409 // Board SCK MOSI MISO
+
410 // ESP8266 D5 D7 D6
+
411 // ESP32 D18 D23 D19
+
412 #if defined(LORAWAN_NODE)
+
413  // Use pinning for LoRaWAN_Node (https://github.com/matthias-bs/LoRaWAN_Node)
+
414  #define PIN_RECEIVER_CS 14
+
415 
+
416  // CC1101: GDO0 / RFM95W/SX127x: G0
+
417  #define PIN_RECEIVER_IRQ 4
+
418 
+
419  // CC1101: GDO2 / RFM95W/SX127x: G1
+
420  #define PIN_RECEIVER_GPIO 16
+
421 
+
422  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
423  #define PIN_RECEIVER_RST 12
+
424 
+
425 #elif defined(FIREBEETLE_ESP32_COVER_LORA)
+
426  #define PIN_RECEIVER_CS 27 // D4
+
427 
+
428  // CC1101: GDO0 / RFM95W/SX127x: G0
+
429  #define PIN_RECEIVER_IRQ 26 // D3
+
430 
+
431  // CC1101: GDO2 / RFM95W/SX127x: G1
+
432  #define PIN_RECEIVER_GPIO 9 // D5
+
433 
+
434  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
435  #define PIN_RECEIVER_RST 25 // D2
+
436 
+
437 #elif defined(ARDUINO_TTGO_LoRa32_V1) || defined(ARDUINO_TTGO_LoRa32_V2)
+
438  // Use pinning for LILIGO TTGO LoRa32-OLED
+
439  #define PIN_RECEIVER_CS LORA_CS
+
440 
+
441  // CC1101: GDO0 / RFM95W/SX127x: G0
+
442  #define PIN_RECEIVER_IRQ LORA_IRQ
+
443 
+
444  // CC1101: GDO2 / RFM95W/SX127x: G1
+
445  // n.c. on v1/v2?, LORA_D1 on v21
+
446  #define PIN_RECEIVER_GPIO 33
+
447 
+
448  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
449  #define PIN_RECEIVER_RST LORA_RST
+
450 
+
451 #elif defined(ARDUINO_TTGO_LoRa32_v21new)
+
452  // Use pinning for LILIGO TTGO LoRa32-OLED V2.1 (1.6.1)
+
453  // Same pinout for Heltec Wireless Stick
+
454  #define PIN_RECEIVER_CS LORA_CS
+
455 
+
456  // CC1101: GDO0 / RFM95W/SX127x: G0
+
457  #define PIN_RECEIVER_IRQ LORA_IRQ
+
458 
+
459  // CC1101: GDO2 / RFM95W/SX127x: G1
+
460  #define PIN_RECEIVER_GPIO LORA_D1
+
461 
+
462  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
463  #define PIN_RECEIVER_RST LORA_RST
+
464 
+
465 #elif defined(ARDUINO_heltec_wireless_stick) || defined(ARDUINO_heltec_wifi_lora_32_V2)
+
466  // Use pinning for Heltec Wireless Stick or WiFi LoRa32 V2, respectively
+
467  #define PIN_RECEIVER_CS SS
+
468 
+
469  // CC1101: GDO0 / RFM95W/SX127x: G0
+
470  #define PIN_RECEIVER_IRQ DIO0
+
471 
+
472  // CC1101: GDO2 / RFM95W/SX127x: G1
+
473  #define PIN_RECEIVER_GPIO DIO1
+
474 
+
475  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
476  #define PIN_RECEIVER_RST RST_LoRa
+
477 
+
478 #elif defined(ARDUINO_heltec_wifi_32_lora_V3) || defined(ARDUINO_heltec_wifi_lora_32_V3)
+
479  // Use pinning for Heltec WiFi LoRa32 V3
+
480  #define PIN_RECEIVER_CS SS
+
481 
+
482  // CC1101: GDO0 / RFM95W/SX127x: G0 / SX1262: DIO0
+
483  #define PIN_RECEIVER_IRQ DIO0
+
484 
+
485  // CC1101: GDO2 / RFM95W/SX127x: G1 / SX1262: BUSY
+
486  #define PIN_RECEIVER_GPIO BUSY_LoRa
+
487 
+
488  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
489  #define PIN_RECEIVER_RST RST_LoRa
+
490 
+
491 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
+
492  // Use pinning for Adafruit Feather ESP32S2 with RFM95W "FeatherWing" ADA3232
+
493  #define PIN_RECEIVER_CS 6
+
494 
+
495  // CC1101: GDO0 / RFM95W/SX127x: G0
+
496  #define PIN_RECEIVER_IRQ 5
+
497 
+
498  // CC1101: GDO2 / RFM95W/SX127x: G1
+
499  #define PIN_RECEIVER_GPIO 11
+
500 
+
501  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
502  #define PIN_RECEIVER_RST 9
+
503 
+
504 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
+
505  // Use pinning for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
+
506  #define PIN_RECEIVER_CS 14
+
507 
+
508  // CC1101: GDO0 / RFM95W/SX127x: G0
+
509  #define PIN_RECEIVER_IRQ 32
+
510 
+
511  // CC1101: GDO2 / RFM95W/SX127x: G1
+
512  #define PIN_RECEIVER_GPIO 33
+
513 
+
514  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
515  #define PIN_RECEIVER_RST 27
+
516 
+
517 #elif defined(ARDUINO_FEATHER_ESP32)
+
518  // Use pinning for Adafruit Feather ESP32 with RFM95W "FeatherWing" ADA3232
+
519  #define PIN_RECEIVER_CS 14
+
520 
+
521  // CC1101: GDO0 / RFM95W/SX127x: G0
+
522  #define PIN_RECEIVER_IRQ 32
+
523 
+
524  // CC1101: GDO2 / RFM95W/SX127x: G1
+
525  #define PIN_RECEIVER_GPIO 33
+
526 
+
527  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
528  #define PIN_RECEIVER_RST 27
+
529 
+
530 #elif defined(ARDUINO_M5STACK_CORE2) || defined(ARDUINO_M5STACK_Core2)
+
531  // Note: Depending on board package file date, either variant is used -
+
532  // see https://github.com/espressif/arduino-esp32/issues/9423!
+
533  // Use pinning for M5Stack Core2 with M5Stack Module LoRa868
+
534  #define PIN_RECEIVER_CS 33
+
535 
+
536  // CC1101: GDO0 / RFM95W/SX127x: G0
+
537  #define PIN_RECEIVER_IRQ 36
+
538 
+
539  // CC1101: GDO2 / RFM95W/SX127x: G1
+
540  #define PIN_RECEIVER_GPIO 35
+
541 
+
542  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
543  #define PIN_RECEIVER_RST 26
+
544 
+
545 #elif defined(ARDUINO_ESP32S3_POWERFEATHER)
+
546  // Use pinning for ESP32-S3 PowerFeather with RFM95W "FeatherWing" ADA3232
+
547  #define PIN_RECEIVER_CS 15
+
548 
+
549  // CC1101: GDO0 / RFM95W/SX127x: G0
+
550  #define PIN_RECEIVER_IRQ 16
+
551 
+
552  // CC1101: GDO2 / RFM95W/SX127x: G1
+
553  #define PIN_RECEIVER_GPIO 18
+
554 
+
555  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
556  #define PIN_RECEIVER_RST 45
+
557 
+
558 #elif defined(ESP32)
+
559  // Generic pinning for ESP32 development boards
+
560  #define PIN_RECEIVER_CS 27
+
561 
+
562  // CC1101: GDO0 / RFM95W/SX127x: G0
+
563  #define PIN_RECEIVER_IRQ 21
+
564 
+
565  // CC1101: GDO2 / RFM95W/SX127x: G1
+
566  #define PIN_RECEIVER_GPIO 33
+
567 
+
568  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
569  #define PIN_RECEIVER_RST 32
+
570 
+
571 #elif defined(ESP8266)
+
572  // Generic pinning for ESP8266 development boards (e.g. LOLIN/WEMOS D1 mini)
+
573  #define PIN_RECEIVER_CS 15
+
574 
+
575  // CC1101: GDO0 / RFM95W/SX127x: G0
+
576  #define PIN_RECEIVER_IRQ 4
+
577 
+
578  // CC1101: GDO2 / RFM95W/SX127x: G1
+
579  #define PIN_RECEIVER_GPIO 5
+
580 
+
581  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
582  #define PIN_RECEIVER_RST 2
+
583 
+
584 #elif defined(ARDUINO_AVR_FEATHER32U4)
+
585  // Pinning for Adafruit Feather 32u4
+
586  #define PIN_RECEIVER_CS 8
+
587 
+
588  // CC1101: GDO0 / RFM95W/SX127x: G0
+
589  #define PIN_RECEIVER_IRQ 7
+
590 
+
591  // CC1101: GDO2 / RFM95W/SX127x: G1 (not used)
+
592  #define PIN_RECEIVER_GPIO 99
+
593 
+
594  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
595  #define PIN_RECEIVER_RST 4
+
596 
+
597 #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
598  // Use pinning for Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
+
599  #define PIN_RECEIVER_CS 7
+
600 
+
601  // CC1101: GDO0 / RFM95W/SX127x: G0
+
602  #define PIN_RECEIVER_IRQ 8
+
603 
+
604  // CC1101: GDO2 / RFM95W/SX127x: G1 (not used)
+
605  #define PIN_RECEIVER_GPIO 10
+
606 
+
607  // RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
+
608  #define PIN_RECEIVER_RST 11
+
609 
+
610 #endif
+
611 
+
612 #define STR_HELPER(x) #x
+
613 #define STR(x) STR_HELPER(x)
+
614 #pragma message("Receiver chip: " RECEIVER_CHIP)
+
615 #pragma message("Pin config: RST->" STR(PIN_RECEIVER_RST) ", CS->" STR(PIN_RECEIVER_CS) ", GD0/G0/IRQ->" STR(PIN_RECEIVER_IRQ) ", GDO2/G1/GPIO->" STR(PIN_RECEIVER_GPIO) )
+
616 
+
617 #endif