From 5fad8c116f330cd33201966280a6e21b7fbf3b5a Mon Sep 17 00:00:00 2001 From: Matthias Prinke Date: Sat, 30 Sep 2023 16:44:07 +0200 Subject: [PATCH] Added RP2040 after testing --- library.properties | 2 +- package.json | 2 +- src/WeatherSensorCfg.h | 11 ++++++++--- src/WeatherSensorCfg.h.template | 11 ++++++++--- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/library.properties b/library.properties index ab42bcea..83f4561a 100644 --- a/library.properties +++ b/library.properties @@ -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 diff --git a/package.json b/package.json index 7743399a..9413b763 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/src/WeatherSensorCfg.h b/src/WeatherSensorCfg.h index ea60b400..3fd30948 100644 --- a/src/WeatherSensorCfg.h +++ b/src/WeatherSensorCfg.h @@ -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 // @@ -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 @@ -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(); } diff --git a/src/WeatherSensorCfg.h.template b/src/WeatherSensorCfg.h.template index d2c481b8..5b22882f 100644 --- a/src/WeatherSensorCfg.h.template +++ b/src/WeatherSensorCfg.h.template @@ -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 // @@ -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 @@ -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(); }