diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fc30c5..2ab7134 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,6 +99,8 @@ jobs: chip: esp32c3 - name: ESP32C3_OctopusLab_LoRa chip: esp32c3 + - name: ESP32C3_SuperMini_DIY_LoRa_SX1278 + chip: esp32c3 - name: QRPLabs_LightGateway_1_0 chip: esp32s3 - name: QRPLabs_LightGateway_Plus_1_0 diff --git a/README.md b/README.md index c5a860a..71d3b43 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,8 @@ ____________________________________________________ - ESP32C3 + Ebyte 400M30S(or 900M30S) 1W LoRa Module for another DIY version. +- ESP32C3 SuperMini + SX1278 (RA-01/RA-02) LoRa Module DIY version. + - ESP32 + 4G/LTE A7670 Modem + SX1278 DIY Version. - Wemos Lolin32 Oled + SX1278 DIY Version. diff --git a/src/battery_utils.cpp b/src/battery_utils.cpp index 0e56ef2..cf30f8d 100644 --- a/src/battery_utils.cpp +++ b/src/battery_utils.cpp @@ -160,7 +160,7 @@ namespace BATTERY_Utils { int sampleSum = 0; for (int i = 0; i < adcReadings; i++) { - #if defined(ESP32_DIY_LoRa_SX1278) || defined(ESP32_DIY_LoRa_915_SX1276) || defined(ESP32_DIY_1W_LoRa_E22_400M30S) || defined(ESP32_DIY_1W_LoRa_915_E22_900M30S) || defined(ESP32_DIY_1W_LoRa_E32_400M30S) + #if defined(ESP32_DIY_LoRa_SX1278) || defined(ESP32_DIY_LoRa_915_SX1276) || defined(ESP32_DIY_1W_LoRa_E22_400M30S) || defined(ESP32_DIY_1W_LoRa_915_E22_900M30S) || defined(ESP32_DIY_1W_LoRa_E32_400M30S) || defined(ESP32C3_SuperMini_DIY_LoRa_SX1278) sampleSum = 0; #else #ifdef HAS_ADC_CALIBRATION diff --git a/variants/ESP32C3_SuperMini_DIY_LoRa_SX1278/board_pinout.h b/variants/ESP32C3_SuperMini_DIY_LoRa_SX1278/board_pinout.h new file mode 100644 index 0000000..c43dec7 --- /dev/null +++ b/variants/ESP32C3_SuperMini_DIY_LoRa_SX1278/board_pinout.h @@ -0,0 +1,46 @@ +/* Copyright (C) 2025 Ricardo Guzman - CA2RXU + * + * This file is part of LoRa APRS iGate. + * + * LoRa APRS iGate is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * LoRa APRS iGate is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with LoRa APRS iGate. If not, see . + */ + +#ifndef BOARD_PINOUT_H_ +#define BOARD_PINOUT_H_ + + #define HAS_SX1278 + #define RADIO_SCLK_PIN 4 + #define RADIO_MISO_PIN 5 + #define RADIO_MOSI_PIN 6 + #define RADIO_CS_PIN 7 + #define RADIO_RST_PIN 3 + #define RADIO_BUSY_PIN 2 + #define RADIO_WAKEUP_PIN RADIO_BUSY_PIN + #define GPIO_WAKEUP_PIN GPIO_NUM_2 + + // Display + #define HAS_DISPLAY + + #undef OLED_SDA + #undef OLED_SCL + #undef OLED_RST + + #define OLED_SDA 8 + #define OLED_SCL 9 + #define OLED_RST 10 + + // I2C + #define USE_WIRE_WITH_OLED_PINS + +#endif \ No newline at end of file diff --git a/variants/ESP32C3_SuperMini_DIY_LoRa_SX1278/platformio.ini b/variants/ESP32C3_SuperMini_DIY_LoRa_SX1278/platformio.ini new file mode 100644 index 0000000..9867f42 --- /dev/null +++ b/variants/ESP32C3_SuperMini_DIY_LoRa_SX1278/platformio.ini @@ -0,0 +1,13 @@ +[env:ESP32C3_SuperMini_DIY_LoRa_SX1278] +board = esp32-c3-devkitm-1 +board_build.mcu = esp32c3 +build_flags = + ${common.build_flags} + ${common.usb_flags} + -D RADIOLIB_EXCLUDE_LR11X0=1 + -D RADIOLIB_EXCLUDE_SX126X=1 + -D RADIOLIB_EXCLUDE_SX128X=1 + -D ESP32C3_SuperMini_DIY_LoRa_SX1278 +lib_deps = + ${common.lib_deps} + ${common.display_libs} \ No newline at end of file