Skip to content

Commit

Permalink
Merge pull request #6 from matthias-bs/feat-sensor-config
Browse files Browse the repository at this point in the history
Added sensor configuration (BLE and Bresser) at run time
  • Loading branch information
matthias-bs committed Apr 18, 2024
2 parents 9060fab + 3b28be8 commit 59d765d
Show file tree
Hide file tree
Showing 9 changed files with 481 additions and 287 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
#declare -a required_libs=("https://github.com/matthias-bs/BresserWeatherSensorReceiver.git"
declare -a required_libs=(
"RadioLib@6.5.0"
"BresserWeatherSensorReceiver@0.25.0"
"BresserWeatherSensorReceiver@0.27.0"
"LoRa Serialization@3.2.1"
"ESP32Time@2.0.6"
"OneWireNg@0.13.3"
Expand Down
10 changes: 6 additions & 4 deletions BresserWeatherSensorLW.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// RadioLib 6.5.0
// LoRa_Serialization 3.2.1
// ESP32Time 2.0.6
// BresserWeatherSensorReceiver 0.25.0
// BresserWeatherSensorReceiver 0.26.0
// OneWireNg 0.13.1 (optional)
// DallasTemperature 3.9.0 (optional)
// NimBLE-Arduino 1.4.1 (optional)
Expand Down Expand Up @@ -465,13 +465,15 @@ void setup()
#endif

#if defined(ARDUINO_ESP32S3_POWERFEATHER)
Board.init();
Board.enable3V3(true);
delay(2000);
Board.init(); // Note: Battery capacity / type has to be set for voltage measurement
Board.enable3V3(true); // Power supply for FeatherWing
Board.enableVSQT(true); // Power supply for battery management chip (voltage measurement)
#endif

Serial.begin(115200);
delay(2000); // give time to switch to the serial monitor
log_i("\nSetup");
log_i("Setup");

#if defined(ARDUINO_ARCH_RP2040)
// see pico-sdk/src/rp2_common/hardware_rtc/rtc.c
Expand Down
7 changes: 4 additions & 3 deletions BresserWeatherSensorLWCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
#if !defined(_LWCFG_H)
#define _LWCFG_H

#include <vector>
#include <string>
//#include <vector>
//#include <string>

// Downlink messages
// ------------------
Expand Down Expand Up @@ -207,7 +207,8 @@
#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)
!defined(ARDUINO_M5STACK_Core2) && !defined(ARDUINO_M5STACK_CORE2) && \
!defined(ARDUINO_ESP32S3_POWERFEATHER)
// Use pinning for LoRaWAN Node
#define LORAWAN_NODE

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ This project is in early stage of development - stay tuned.
| :white_check_mark: | [Heltec WiFi LoRa 32 V3](https://heltec.org/project/wifi-lora-32-v3/) | Heltec WiFi LoRa 32(V3) | heltec_wifi_32_lora_V3 | SX1262 | - |
| :white_check_mark: | [LoRaWAN_Node](https://github.com/matthias-bs/LoRaWAN_Node) | FireBeetle-ESP32 | ESP32_DEV -> LORAWAN_NODE | SX1276 (RFM95W) | - |
| :white_check_mark: | [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 | ESP32_DEV & FIREBEETLE_ESP32_COVER_LORA | SX1276 (LoRa1276) | Wiring on the cover: <br>D2 to RESET<br>D3 to DIO0<br>D4 to CS<br>D5 to DIO1 |
| :hourglass: | [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 | ADAFRUIT_FEATHER_ESP32S2 | SX1276 (RFM95W) | **No Bluetooth available!**<br>Wiring on the Featherwing:<br>E to IRQ<br>D to CS<br>C to RST<br>A to DI01 |
| :hourglass: | [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 | FEATHER_ESP32S2 | SX1276 (RFM95W) | **No Bluetooth available!**<br>Wiring on the Featherwing:<br>E to IRQ<br>D to CS<br>C to RST<br>A to DI01 |
| :white_check_mark: | [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 | FEATHER_ESP32 | SX1276 (RFM95W) | Wiring on the Featherwing:<br>E to IRQ<br>D to CS<br>C to RST<br>A to DI01<br><br>**see** [**#55**](https://github.com/matthias-bs/BresserWeatherSensorTTN/issues/55) |
| :white_check_mark: | [M5Stack Core2](https://docs.m5stack.com/en/core/core2) with [M5Stack Module LoRa868](https://docs.m5stack.com/en/module/lora868) | M5Core2 | M5STACK_CORE2 | SX1276<br>(RA-01H) | Wiring on the LoRa868 Module: <br>DIO1 to GPIO35<br><br>"M5Unified" must be installed <br>`M5.begin()`is called to control power management |
| :hourglass: | [ESP32-S3 PowerFeather](https://powerfeather.dev/) with [Adafruit LoRa Radio FeatherWing](https://www.adafruit.com/product/3231) | ESP32-S3 PowerFeather | ESP32S3_POWERFEATHER | SX1276 (RFM95W) | Wiring on the Featherwing:<br>E to IRQ<br>D to CS<br>C to RST<br>A to DI01<br><br>"PowerFeather-SDK" must be installed<br>`Board.init();` is called to control power management |
| :white_check_mark: | [Adafruit Feather RP2040](https://www.adafruit.com/product/4884) with [Adafruit LoRa Radio FeatherWing](https://www.adafruit.com/product/3231) | Adafruit Feather RP2040 | ADAFRUIT_FEATHER_RP2040 | SX1276 (RFM95W) | **No Bluetooth available!**<br>**Configuration: Choose an entry with "FS" in section __Flash Size__!**<br>Wiring on the Featherwing:<br>E to IRQ<br>D to CS<br>C to RST<br>A to DI01 |

:hourglass: &mdash; confirmation pending
Expand Down
1 change: 0 additions & 1 deletion config.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ const uint8_t subBand = 0; // For US915, change this to 2, otherwise leave on 0
#define PIN_LORA_IRQ 16
#define PIN_LORA_GPIO 18
#define PIN_LORA_DIO2 RADIOLIB_NC
#pragma message("NOT TESTED!!!")
#pragma message("ARDUINO_ESP32S3_POWERFEATHER defined; assuming RFM95W FeatherWing will be used")
#pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
#define LORA_CHIP SX1276
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/matthias-bs/BresserWeatherSensorLW#README",
"dependencies": {
"BresserWeatherSensorReceiver": "matthias-bs/BresserWeatherSensorReceiver#semver:^0.26.0",
"BresserWeatherSensorReceiver": "matthias-bs/BresserWeatherSensorReceiver#semver:^0.27.0",
"RadioLib": "jgromes/RadioLib#semver:^6.5.0",
"lora-serialization": "thesolarnomad/lora-serialization#semver:^3.2.1",
"ESP32Time": "fbiego/ESP32Time#semver:^2.0.6",
Expand Down
Loading

0 comments on commit 59d765d

Please sign in to comment.