Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
Improved config for Firebeetle Cover LoRa and Adafruit Feather ESP32-S2
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Oct 9, 2023
1 parent f7d5e79 commit 90fdd5c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions BresserWeatherSensorTTNCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,27 @@
// Battery voltage thresholds for energy saving

// If SLEEP_EN is defined and battery voltage is below BATTERY_WEAK [mV], MCU will sleep for SLEEP_INTERVAL_LONG
#if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
#if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
// External voltage divider required
#pragma message("External voltage divider required for battery voltage measurement.")
#pragma message("Setting BATTERY_WEAK 0 (no power-saving).")
#define BATTERY_WEAK 0
#elif defined(FIREBEETLE_COVER_LORA)
#pragma message("On-board voltage divider must be enabled for battery voltage measurement (see schematic).")
#pragma message("Setting BATTERY_WEAK 0 (no power-saving).")
#define BATTERY_WEAK 0
#else
#define BATTERY_WEAK 3500
#endif


// Go to sleep mode immediately after start if battery voltage is below BATTERY_LOW [mV]
#if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040)
#if defined(ARDUINO_ADAFRUIT_FEATHER_RP2040) || defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
// External voltage divider required
#pragma message("Setting BATTERY_LOW 0 (no deep-discharge prevention).")
#define BATTERY_LOW 0
#elif defined(FIREBEETLE_COVER_LORA)
#pragma message("Setting BATTERY_LOW 0 (no deep-discharge prevention).")
#define BATTERY_LOW 0
#else
#define BATTERY_LOW 3200
Expand Down

0 comments on commit 90fdd5c

Please sign in to comment.