Skip to content

Commit

Permalink
Added RP2040 after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Sep 30, 2023
1 parent ac1da9a commit 5fad8c1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ paragraph=Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver for
category=Sensors
url=https://github.com/matthias-bs/BresserWeatherSensorReceiver
depends=RadioLib,MQTT,ArduinoJson
architectures=esp32,esp8266
architectures=esp32,esp8266,rp2040
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver for Arduino based on CC1101 or SX1276/RFM95W",
"main": "WeatherSensor.cpp",
"frameworks": "arduino",
"platforms": ["ESP32", "ESP8266"],
"platforms": ["ESP32", "ESP8266", "RP2040"],
"directories": {
"src": "src"
},
Expand Down
11 changes: 8 additions & 3 deletions src/WeatherSensorCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
// This define is set by selecting "Adafruit ESP32 Feather" in the Arduino IDE:
//#define ARDUINO_FEATHER_ESP32

// Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
// https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
//
// This define is set by selecting "Adafruit Feather RP2040" in the Arduino IDE:
//#define ARDUINO_ADAFRUIT_FEATHER_RP2040

// DFRobot Firebeetle32
// https://github.com/espressif/arduino-esp32/tree/master/variants/firebeetle32/pins_arduino.h
//
Expand Down Expand Up @@ -146,7 +152,6 @@
#pragma message("ARDUINO_ADAFRUIT_FEATHER_RP2040 defined; assuming assuming RFM95W FeatherWing will be used")
#define USE_SX1276
#pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
#pragma message("NOT TESTED!")

#elif defined(ARDUINO_ESP32_DEV)
//#define LORAWAN_NODE
Expand Down Expand Up @@ -224,13 +229,13 @@
#define ARDUHAL_LOG_LEVEL_VERBOSE 5

#if defined(ARDUINO_ARCH_RP2040) && defined(DEBUG_RP2040_PORT)
#define DEBUG_ESP_PORT DEBUG_RP2040_PORT
#define DEBUG_PORT DEBUG_RP2040_PORT
#elif defined(DEBUG_ESP_PORT)
#define DEBUG_PORT DEBUG_ESP_PORT
#endif

// Set desired level here!
#define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_VERBOSE
#define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_DEBUG

#if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
#define log_e(...) { DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
Expand Down
11 changes: 8 additions & 3 deletions src/WeatherSensorCfg.h.template
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
// This define is set by selecting "Adafruit ESP32 Feather" in the Arduino IDE:
//#define ARDUINO_FEATHER_ESP32

// Adafruit Feather RP2040 with RFM95W "FeatherWing" ADA3232
// https://github.com/espressif/arduino-esp32/blob/master/variants/feather_esp32/pins_arduino.h
//
// This define is set by selecting "Adafruit Feather RP2040" in the Arduino IDE:
//#define ARDUINO_ADAFRUIT_FEATHER_RP2040

// DFRobot Firebeetle32
// https://github.com/espressif/arduino-esp32/tree/master/variants/firebeetle32/pins_arduino.h
//
Expand Down Expand Up @@ -146,7 +152,6 @@
#pragma message("ARDUINO_ADAFRUIT_FEATHER_RP2040 defined; assuming assuming RFM95W FeatherWing will be used")
#define USE_SX1276
#pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")
#pragma message("NOT TESTED!")

#elif defined(ARDUINO_ESP32_DEV)
//#define LORAWAN_NODE
Expand Down Expand Up @@ -224,13 +229,13 @@
#define ARDUHAL_LOG_LEVEL_VERBOSE 5

#if defined(ARDUINO_ARCH_RP2040) && defined(DEBUG_RP2040_PORT)
#define DEBUG_ESP_PORT DEBUG_RP2040_PORT
#define DEBUG_PORT DEBUG_RP2040_PORT
#elif defined(DEBUG_ESP_PORT)
#define DEBUG_PORT DEBUG_ESP_PORT
#endif

// Set desired level here!
#define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_VERBOSE
#define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_DEBUG

#if defined(DEBUG_PORT) && CORE_DEBUG_LEVEL > ARDUHAL_LOG_LEVEL_NONE
#define log_e(...) { DEBUG_PORT.printf(__VA_ARGS__); DEBUG_PORT.println(); }
Expand Down

0 comments on commit 5fad8c1

Please sign in to comment.