diff --git a/_bresser_weather_sensor_t_t_n_cfg_8h_source.html b/_bresser_weather_sensor_t_t_n_cfg_8h_source.html index ea880a2..5c7c10b 100644 --- a/_bresser_weather_sensor_t_t_n_cfg_8h_source.html +++ b/_bresser_weather_sensor_t_t_n_cfg_8h_source.html @@ -151,242 +151,243 @@
64 // 20231009 Added configuration for FIREBEETLE_COVER_LORA
65 // Improved config for Firebeetle Cover LoRa and
66 // Adafruit Feather ESP32-S2 (default battery voltage thresholds)
-
67 //
-
68 // ToDo:
-
69 // -
-
70 //
-
72 
-
73 #include <vector>
-
74 #include <string>
-
75 
-
76 // Enable debug mode (debug messages via serial port)
-
77 // Arduino IDE: Tools->Core Debug Level: "Debug|Verbose"
-
78 // For other architectures than ESP32, see logging.h
-
79 
-
80 // Enable logging for https://github.com/vshymanskyy/Preferences (used for RP2040)
-
81 //#define NVS_LOG
-
82 
-
83 //--- Select Board ---
-
84 #if !defined(ARDUINO_TTGO_LoRa32_V1) && !defined(ARDUINO_TTGO_LoRa32_V2) && \
-
85  !defined(ARDUINO_TTGO_LoRa32_v21new) && !defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2) && \
-
86  !defined(ARDUINO_FEATHER_ESP32) && !defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
87  // Use pinning for LoRaWAN Node
-
88  //#define LORAWAN_NODE
-
89 
-
90  // Use pinning for Firebeetle Cover LoRa
-
91  #define FIREBEETLE_COVER_LORA
-
92 #endif
-
93 
-
94 //--- Select LoRaWAN Network ---
-
95 // The Things Network
-
96 #define ARDUINO_LMIC_CFG_NETWORK_TTN 1
-
97 
-
98 // Helium Network
-
99 // see mcci-cathena/arduino-lorawan issue #185 "Add Helium EU868 support"
-
100 // (https://github.com/mcci-catena/arduino-lorawan/issues/185)
-
101 #define ARDUINO_LMIC_CFG_NETWORK_GENERIC 0
-
102 
-
103 // Enable LORAWAN debug mode - this generates dummy weather data and skips weather sensor reception
-
104 //#define LORAWAN_DEBUG
-
105 
-
106 // LoRaWAN session info is stored in RTC RAM on ESP32 and in Preferences (flash) on RP2040
-
107 #if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
108  #define SESSION_IN_PREFERENCES
-
109 #endif
-
110 
-
111 // Battery voltage thresholds for energy saving
-
112 
-
113 // If SLEEP_EN is defined and battery voltage is below BATTERY_WEAK [mV], MCU will sleep for SLEEP_INTERVAL_LONG
-
114 #if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
-
115  // External voltage divider required
-
116  #pragma message("External voltage divider required for battery voltage measurement.")
-
117  #pragma message("Setting BATTERY_WEAK 0 (no power-saving).")
-
118  #define BATTERY_WEAK 0
-
119 #elif defined(FIREBEETLE_COVER_LORA)
-
120  #pragma message("On-board voltage divider must be enabled for battery voltage measurement (see schematic).")
-
121  #pragma message("Setting BATTERY_WEAK 0 (no power-saving).")
-
122  #define BATTERY_WEAK 0
-
123 #else
-
124  #define BATTERY_WEAK 3500
-
125 #endif
-
126 
+
67 // Renamed FIREBEETLE_COVER_LORA in FIREBEETLE_ESP32_COVER_LORA
+
68 //
+
69 // ToDo:
+
70 // -
+
71 //
+
73 
+
74 #include <vector>
+
75 #include <string>
+
76 
+
77 // Enable debug mode (debug messages via serial port)
+
78 // Arduino IDE: Tools->Core Debug Level: "Debug|Verbose"
+
79 // For other architectures than ESP32, see logging.h
+
80 
+
81 // Enable logging for https://github.com/vshymanskyy/Preferences (used for RP2040)
+
82 //#define NVS_LOG
+
83 
+
84 //--- Select Board ---
+
85 #if !defined(ARDUINO_TTGO_LoRa32_V1) && !defined(ARDUINO_TTGO_LoRa32_V2) && \
+
86  !defined(ARDUINO_TTGO_LoRa32_v21new) && !defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2) && \
+
87  !defined(ARDUINO_FEATHER_ESP32) && !defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
88  // Use pinning for LoRaWAN Node
+
89  //#define LORAWAN_NODE
+
90 
+
91  // Use pinning for Firebeetle Cover LoRa
+
92  #define FIREBEETLE_ESP32_COVER_LORA
+
93 #endif
+
94 
+
95 //--- Select LoRaWAN Network ---
+
96 // The Things Network
+
97 #define ARDUINO_LMIC_CFG_NETWORK_TTN 1
+
98 
+
99 // Helium Network
+
100 // see mcci-cathena/arduino-lorawan issue #185 "Add Helium EU868 support"
+
101 // (https://github.com/mcci-catena/arduino-lorawan/issues/185)
+
102 #define ARDUINO_LMIC_CFG_NETWORK_GENERIC 0
+
103 
+
104 // Enable LORAWAN debug mode - this generates dummy weather data and skips weather sensor reception
+
105 //#define LORAWAN_DEBUG
+
106 
+
107 // LoRaWAN session info is stored in RTC RAM on ESP32 and in Preferences (flash) on RP2040
+
108 #if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
109  #define SESSION_IN_PREFERENCES
+
110 #endif
+
111 
+
112 // Battery voltage thresholds for energy saving
+
113 
+
114 // If SLEEP_EN is defined and battery voltage is below BATTERY_WEAK [mV], MCU will sleep for SLEEP_INTERVAL_LONG
+
115 #if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
+
116  // External voltage divider required
+
117  #pragma message("External voltage divider required for battery voltage measurement.")
+
118  #pragma message("Setting BATTERY_WEAK 0 (no power-saving).")
+
119  #define BATTERY_WEAK 0
+
120 #elif defined(FIREBEETLE_ESP32_COVER_LORA)
+
121  #pragma message("On-board voltage divider must be enabled for battery voltage measurement (see schematic).")
+
122  #pragma message("Setting BATTERY_WEAK 0 (no power-saving).")
+
123  #define BATTERY_WEAK 0
+
124 #else
+
125  #define BATTERY_WEAK 3500
+
126 #endif
127 
-
128 // Go to sleep mode immediately after start if battery voltage is below BATTERY_LOW [mV]
-
129 #if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
-
130  // External voltage divider required
-
131  #pragma message("Setting BATTERY_LOW 0 (no deep-discharge prevention).")
-
132  #define BATTERY_LOW 0
-
133 #elif defined(FIREBEETLE_COVER_LORA)
-
134  #pragma message("Setting BATTERY_LOW 0 (no deep-discharge prevention).")
-
135  #define BATTERY_LOW 0
-
136 #else
-
137  #define BATTERY_LOW 3200
-
138 #endif
-
139 
-
140 // Enable sleep mode - sleep after successful transmission to TTN (recommended!)
-
141 #define SLEEP_EN
-
142 
-
143 // If SLEEP_EN is defined, MCU will sleep for SLEEP_INTERVAL seconds after succesful transmission
-
144 #define SLEEP_INTERVAL 360
-
145 
-
146 // Long sleep interval, MCU will sleep for SLEEP_INTERVAL_LONG seconds if battery voltage is below BATTERY_WEAK
-
147 #define SLEEP_INTERVAL_LONG 900
-
148 
-
149 // RTC to network time sync interval (in minutes)
-
150 #define CLOCK_SYNC_INTERVAL 24 * 60
-
151 
-
152 // Force deep sleep after a certain time, even if transmission was not completed
-
153 #define FORCE_SLEEP
-
154 
-
155 // Force a new join procedure (instead of re-join) after encountering sleep timeout
-
156 #define FORCE_JOIN_AFTER_SLEEP_TIMEOUT
-
157 
-
158 // During initialization (not joined), force deep sleep after SLEEP_TIMEOUT_INITIAL (if enabled)
-
159 #define SLEEP_TIMEOUT_INITIAL 1800
-
160 
-
161 // If already joined, force deep sleep after SLEEP_TIMEOUT_JOINED seconds (if enabled)
-
162 #define SLEEP_TIMEOUT_JOINED 600
-
163 
-
164 // Additional timeout to be applied after joining if Network Time Request pending
-
165 #define SLEEP_TIMEOUT_EXTRA 300
-
166 
-
167 // Timeout for weather sensor data reception (seconds)
-
168 #define WEATHERSENSOR_TIMEOUT 180
-
169 
-
170 // If enabled, enter deep sleep mode if receiving weather sensor data was not successful
-
171 //#define WEATHERSENSOR_DATA_REQUIRED
-
172 
-
173 // Enable transmission of weather sensor ID
-
174 //#define SENSORID_EN
-
175 
-
176 // Enable rain data statistics
-
177 #define RAINDATA_EN
-
178 
-
179 // Enable battery / supply voltage measurement
-
180 #define ADC_EN
-
181 
-
182 // Enable OneWire temperature measurement
-
183 #define ONEWIRE_EN
-
184 
-
185 // Enable BLE temperature/humidity measurement
-
186 // Notes:
-
187 // * BLE requires a lot of program memory!
-
188 // * ESP32-S2 does not provide BLE!
-
189 #if !defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2) && !defined(ARDUINO_ARCH_RP2040)
-
190  //#define MITHERMOMETER_EN
-
191  #define THEENGSDECODER_EN
-
192 #endif
-
193 
-
194 // Enable Bresser Soil Temperature/Moisture Sensor
-
195 #define SOILSENSOR_EN
-
196 
-
197 // Enable Bresser Lightning Sensor
-
198 #define LIGHTNINGSENSOR_EN
-
199 
-
200 // Enter your time zone (https://remotemonitoringsystems.ca/time-zone-abbreviations.php)
-
201 const char* TZ_INFO = "CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00";
-
202 
-
203 // Enable Ultrasonic Distance Sensor
-
204 #if defined(LORAWAN_NODE) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
205  //#define DISTANCESENSOR_EN
-
206 #endif
-
207 
-
208 // ADC for supply/battery voltage measurement
-
209 // Defaults:
-
210 // ---------
-
211 // FireBeetle ESP32: on-board connection to VB (with R10+R11 assembled)
-
212 // TTGO LoRa32: on-board connection to VBAT
-
213 // Adafruit Feather ESP32: on-board connection to VBAT
-
214 // Adafruit Feather ESP32-S2: no VBAT input circuit
-
215 // Adafruit Feather RP2040: no VBAT input circuit (connect external divider to A0)
-
216 #ifdef ADC_EN
-
217  #if defined(ARDUINO_TTGO_LoRa32_V1) || defined(ARDUINO_TTGO_LoRa32_V2) || defined(ARDUINO_TTGO_LoRa32_v21new)
-
218  #define PIN_ADC_IN 35
-
219  #elif defined(ARDUINO_FEATHER_ESP32)
-
220  #define PIN_ADC_IN A13
-
221  #elif defined(LORAWAN_NODE) || defined(FIREBEETLE_COVER_LORA)
-
222  #define PIN_ADC_IN A0
-
223  #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
224  #define PIN_ADC_IN A0
-
225  #else
-
226  #define PIN_ADC_IN 34
-
227  #endif
-
228 #endif
-
229 
+
128 
+
129 // Go to sleep mode immediately after start if battery voltage is below BATTERY_LOW [mV]
+
130 #if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
+
131  // External voltage divider required
+
132  #pragma message("Setting BATTERY_LOW 0 (no deep-discharge prevention).")
+
133  #define BATTERY_LOW 0
+
134 #elif defined(FIREBEETLE_ESP32_COVER_LORA)
+
135  #pragma message("Setting BATTERY_LOW 0 (no deep-discharge prevention).")
+
136  #define BATTERY_LOW 0
+
137 #else
+
138  #define BATTERY_LOW 3200
+
139 #endif
+
140 
+
141 // Enable sleep mode - sleep after successful transmission to TTN (recommended!)
+
142 #define SLEEP_EN
+
143 
+
144 // If SLEEP_EN is defined, MCU will sleep for SLEEP_INTERVAL seconds after succesful transmission
+
145 #define SLEEP_INTERVAL 360
+
146 
+
147 // Long sleep interval, MCU will sleep for SLEEP_INTERVAL_LONG seconds if battery voltage is below BATTERY_WEAK
+
148 #define SLEEP_INTERVAL_LONG 900
+
149 
+
150 // RTC to network time sync interval (in minutes)
+
151 #define CLOCK_SYNC_INTERVAL 24 * 60
+
152 
+
153 // Force deep sleep after a certain time, even if transmission was not completed
+
154 #define FORCE_SLEEP
+
155 
+
156 // Force a new join procedure (instead of re-join) after encountering sleep timeout
+
157 #define FORCE_JOIN_AFTER_SLEEP_TIMEOUT
+
158 
+
159 // During initialization (not joined), force deep sleep after SLEEP_TIMEOUT_INITIAL (if enabled)
+
160 #define SLEEP_TIMEOUT_INITIAL 1800
+
161 
+
162 // If already joined, force deep sleep after SLEEP_TIMEOUT_JOINED seconds (if enabled)
+
163 #define SLEEP_TIMEOUT_JOINED 600
+
164 
+
165 // Additional timeout to be applied after joining if Network Time Request pending
+
166 #define SLEEP_TIMEOUT_EXTRA 300
+
167 
+
168 // Timeout for weather sensor data reception (seconds)
+
169 #define WEATHERSENSOR_TIMEOUT 180
+
170 
+
171 // If enabled, enter deep sleep mode if receiving weather sensor data was not successful
+
172 //#define WEATHERSENSOR_DATA_REQUIRED
+
173 
+
174 // Enable transmission of weather sensor ID
+
175 //#define SENSORID_EN
+
176 
+
177 // Enable rain data statistics
+
178 #define RAINDATA_EN
+
179 
+
180 // Enable battery / supply voltage measurement
+
181 #define ADC_EN
+
182 
+
183 // Enable OneWire temperature measurement
+
184 #define ONEWIRE_EN
+
185 
+
186 // Enable BLE temperature/humidity measurement
+
187 // Notes:
+
188 // * BLE requires a lot of program memory!
+
189 // * ESP32-S2 does not provide BLE!
+
190 #if !defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2) && !defined(ARDUINO_ARCH_RP2040)
+
191  //#define MITHERMOMETER_EN
+
192  #define THEENGSDECODER_EN
+
193 #endif
+
194 
+
195 // Enable Bresser Soil Temperature/Moisture Sensor
+
196 #define SOILSENSOR_EN
+
197 
+
198 // Enable Bresser Lightning Sensor
+
199 #define LIGHTNINGSENSOR_EN
+
200 
+
201 // Enter your time zone (https://remotemonitoringsystems.ca/time-zone-abbreviations.php)
+
202 const char* TZ_INFO = "CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00";
+
203 
+
204 // Enable Ultrasonic Distance Sensor
+
205 #if defined(LORAWAN_NODE) || defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
206  //#define DISTANCESENSOR_EN
+
207 #endif
+
208 
+
209 // ADC for supply/battery voltage measurement
+
210 // Defaults:
+
211 // ---------
+
212 // FireBeetle ESP32: on-board connection to VB (with R10+R11 assembled)
+
213 // TTGO LoRa32: on-board connection to VBAT
+
214 // Adafruit Feather ESP32: on-board connection to VBAT
+
215 // Adafruit Feather ESP32-S2: no VBAT input circuit
+
216 // Adafruit Feather RP2040: no VBAT input circuit (connect external divider to A0)
+
217 #ifdef ADC_EN
+
218  #if defined(ARDUINO_TTGO_LoRa32_V1) || defined(ARDUINO_TTGO_LoRa32_V2) || defined(ARDUINO_TTGO_LoRa32_v21new)
+
219  #define PIN_ADC_IN 35
+
220  #elif defined(ARDUINO_FEATHER_ESP32)
+
221  #define PIN_ADC_IN A13
+
222  #elif defined(LORAWAN_NODE) || defined(FIREBEETLE_ESP32_COVER_LORA)
+
223  #define PIN_ADC_IN A0
+
224  #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
225  #define PIN_ADC_IN A0
+
226  #else
+
227  #define PIN_ADC_IN 34
+
228  #endif
+
229 #endif
230 
-
231 // Additional ADC pins (default: FireBeetle ESP32)
-
232 //#define PIN_ADC0_IN A0
-
233 //#define PIN_ADC1_IN A1
-
234 //#define PIN_ADC2_IN A2
-
235 #ifdef LORAWAN_NODE
-
236  #define PIN_ADC3_IN A3
-
237 #endif
-
238 
-
239 #ifdef PIN_ADC0_IN
-
240  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
-
241  const float ADC0_DIV = 0.5;
-
242  const uint8_t ADC0_SAMPLES = 10;
-
243 #endif
-
244 
-
245 #ifdef PIN_ADC1_IN
-
246  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
-
247  const float ADC1_DIV = 0.5;
-
248  const uint8_t ADC1_SAMPLES = 10;
-
249 #endif
-
250 
-
251 #ifdef PIN_ADC2_IN
-
252  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
-
253  const float ADC2_DIV = 0.5;
-
254  const uint8_t ADC2_SAMPLES = 10;
-
255 #endif
-
256 
-
257 #ifdef PIN_ADC3_IN
-
258  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
-
259  const float ADC3_DIV = 0.5;
-
260  const uint8_t ADC3_SAMPLES = 10;
-
261 #endif
-
262 
-
263 #ifdef ONEWIRE_EN
-
264  #if defined(ARDUINO_TTGO_LoRa32_V1)
-
265  #define PIN_ONEWIRE_BUS 21
-
266  #elif defined(ARDUINO_FEATHER_ESP32) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
-
267  #define PIN_ONEWIRE_BUS 15
-
268  #elif defined(LORAWAN_NODE) || defined(FIREBEETLE_COVER_LORA)
-
269  #define PIN_ONEWIRE_BUS 5
-
270  #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
271  #define PIN_ONEWIRE_BUS 6
-
272  #else
-
273  #define PIN_ONEWIRE_BUS 0
-
274  #endif
-
275 #endif
-
276 
-
277 #ifdef DISTANCESENSOR_EN
-
278  #if defined(LORAWAN_NODE)
-
279  #define DISTANCESENSOR_TX 0 // pull-up/open: processed value / low: real-time value
-
280  #define DISTANCESENSOR_RX 26
-
281  #define DISTANCESENSOR_PWR 25
-
282  #define DISTANCESENSOR_RETRIES 5
-
283  #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
-
284  #define DISTANCESENSOR_TX 0 // pull-up/open: processed value / low: real-time value
-
285  #define DISTANCESENSOR_RX 1
-
286  #define DISTANCESENSOR_PWR 7
-
287  #define DISTANCESENSOR_RETRIES 8
-
288  #endif
-
289 #endif
-
290 
-
291 #ifdef ADC_EN
-
292  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
-
293  const float UBATT_DIV = 0.5;
-
294  const uint8_t UBATT_SAMPLES = 10;
-
295 #endif
-
296 
-
297 #if defined(MITHERMOMETER_EN) || defined(THEENGSDECODER_EN)
-
298  // BLE scan time in seconds
-
299  #define BLE_SCAN_TIME 31
-
300 
-
301  // List of known sensors' BLE addresses
-
302  #define KNOWN_BLE_ADDRESSES {"a4:c1:38:b8:1f:7f"}
-
303 #endif
+
231 
+
232 // Additional ADC pins (default: FireBeetle ESP32)
+
233 //#define PIN_ADC0_IN A0
+
234 //#define PIN_ADC1_IN A1
+
235 //#define PIN_ADC2_IN A2
+
236 #ifdef LORAWAN_NODE
+
237  #define PIN_ADC3_IN A3
+
238 #endif
+
239 
+
240 #ifdef PIN_ADC0_IN
+
241  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
+
242  const float ADC0_DIV = 0.5;
+
243  const uint8_t ADC0_SAMPLES = 10;
+
244 #endif
+
245 
+
246 #ifdef PIN_ADC1_IN
+
247  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
+
248  const float ADC1_DIV = 0.5;
+
249  const uint8_t ADC1_SAMPLES = 10;
+
250 #endif
+
251 
+
252 #ifdef PIN_ADC2_IN
+
253  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
+
254  const float ADC2_DIV = 0.5;
+
255  const uint8_t ADC2_SAMPLES = 10;
+
256 #endif
+
257 
+
258 #ifdef PIN_ADC3_IN
+
259  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
+
260  const float ADC3_DIV = 0.5;
+
261  const uint8_t ADC3_SAMPLES = 10;
+
262 #endif
+
263 
+
264 #ifdef ONEWIRE_EN
+
265  #if defined(ARDUINO_TTGO_LoRa32_V1)
+
266  #define PIN_ONEWIRE_BUS 21
+
267  #elif defined(ARDUINO_FEATHER_ESP32) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
+
268  #define PIN_ONEWIRE_BUS 15
+
269  #elif defined(LORAWAN_NODE) || defined(FIREBEETLE_ESP32_COVER_LORA)
+
270  #define PIN_ONEWIRE_BUS 5
+
271  #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
272  #define PIN_ONEWIRE_BUS 6
+
273  #else
+
274  #define PIN_ONEWIRE_BUS 0
+
275  #endif
+
276 #endif
+
277 
+
278 #ifdef DISTANCESENSOR_EN
+
279  #if defined(LORAWAN_NODE)
+
280  #define DISTANCESENSOR_TX 0 // pull-up/open: processed value / low: real-time value
+
281  #define DISTANCESENSOR_RX 26
+
282  #define DISTANCESENSOR_PWR 25
+
283  #define DISTANCESENSOR_RETRIES 5
+
284  #elif defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
+
285  #define DISTANCESENSOR_TX 0 // pull-up/open: processed value / low: real-time value
+
286  #define DISTANCESENSOR_RX 1
+
287  #define DISTANCESENSOR_PWR 7
+
288  #define DISTANCESENSOR_RETRIES 8
+
289  #endif
+
290 #endif
+
291 
+
292 #ifdef ADC_EN
+
293  // Voltage divider R1 / (R1 + R2) -> V_meas = V(R1 + R2); V_adc = V(R1)
+
294  const float UBATT_DIV = 0.5;
+
295  const uint8_t UBATT_SAMPLES = 10;
+
296 #endif
+
297 
+
298 #if defined(MITHERMOMETER_EN) || defined(THEENGSDECODER_EN)
+
299  // BLE scan time in seconds
+
300  #define BLE_SCAN_TIME 31
+
301 
+
302  // List of known sensors' BLE addresses
+
303  #define KNOWN_BLE_ADDRESSES {"a4:c1:38:b8:1f:7f"}
+
304 #endif