Skip to content

Commit

Permalink
Added LLCC68 1W board
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Sep 23, 2024
1 parent 202d03c commit be7fe23
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
13 changes: 13 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,19 @@ lib_deps =
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10

[env:ESP32_DIY_1W_LoRa_LLCC68]
board = esp32dev
build_flags =
-Werror -Wall
-DESP32_DIY_1W_LoRa_LLCC68
-DHAS_LLCC68
-DHAS_1W_LORA
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
lib_deps =
${common.lib_deps}
adafruit/Adafruit GFX Library @ 1.11.9
adafruit/Adafruit SSD1306 @ 2.5.10

[env:ESP32_DIY_1W_LoRa_Mesh_V1_2]
board = esp32dev
build_flags =
Expand Down
4 changes: 2 additions & 2 deletions src/boards_pinout.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define RADIO_BUSY_PIN 13 // SX1262 BUSY
#endif

#if defined(ESP32_DIY_1W_LoRa) || defined(ESP32_DIY_1W_LoRa_915) // Ebyte E22 400M30S (SX1268) or E22 900M30S (SX1262)
#if defined(ESP32_DIY_1W_LoRa) || defined(ESP32_DIY_1W_LoRa_915) || defined(ESP32_DIY_1W_LoRa_LLCC68) // Ebyte E22 400M30S (SX1268) or E22 900M30S (SX1262) or E220 LLCC68
#define RADIO_SCLK_PIN 18
#define RADIO_MISO_PIN 19
#define RADIO_MOSI_PIN 23
Expand Down Expand Up @@ -143,7 +143,7 @@


// OLED
#if defined(TTGO_T_LORA32_V2_1) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_1W_LoRa) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(OE5HWN_MeshCom) || defined(ESP32_DIY_LoRa_A7670) || defined(TTGO_T_LORA32_V2_1_915) || defined(ESP32_DIY_LoRa_915) || defined(TTGO_T_Beam_V1_0_915) || defined(TTGO_T_Beam_V1_2_915) || defined(ESP32_DIY_LoRa_A7670_915) || defined(ESP32_DIY_1W_LoRa_915) || defined(ESP32_DIY_1W_LoRa_Mesh_V1_2)
#if defined(TTGO_T_LORA32_V2_1) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_1W_LoRa) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(OE5HWN_MeshCom) || defined(ESP32_DIY_LoRa_A7670) || defined(TTGO_T_LORA32_V2_1_915) || defined(ESP32_DIY_LoRa_915) || defined(TTGO_T_Beam_V1_0_915) || defined(TTGO_T_Beam_V1_2_915) || defined(ESP32_DIY_LoRa_A7670_915) || defined(ESP32_DIY_1W_LoRa_915) || defined(ESP32_DIY_1W_LoRa_LLCC68) || defined(ESP32_DIY_1W_LoRa_Mesh_V1_2)
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Expand Down
12 changes: 6 additions & 6 deletions src/lora_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ bool transmitFlag = true;
#ifdef HAS_SX1262
SX1262 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
#endif

#ifdef HAS_SX1268
SX1268 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
#endif

#ifdef HAS_SX1278
SX1278 radio = new Module(RADIO_CS_PIN, RADIO_BUSY_PIN, RADIO_RST_PIN);
#endif

#ifdef HAS_SX1276
SX1276 radio = new Module(RADIO_CS_PIN, RADIO_BUSY_PIN, RADIO_RST_PIN);
#endif
#if defined(HAS_LLCC68) //LLCC68 supports spreading factor only in range of 5-11!
LLCC68 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
#endif

int rssi, freqError;
float snr;
Expand All @@ -53,7 +53,7 @@ namespace LoRa_Utils {
Utils::println("Starting LoRa failed! State: " + String(state));
while (true);
}
#if defined(HAS_SX1262) || defined(HAS_SX1268)
#if defined(HAS_SX1262) || defined(HAS_SX1268) || defined(HAS_LLCC68)
if (!Config.lowPowerMode) {
radio.setDio1Action(setFlag);
} else {
Expand All @@ -73,7 +73,7 @@ namespace LoRa_Utils {
radio.setRfSwitchPins(RADIO_RXEN, RADIO_TXEN);
#endif

#ifdef HAS_1W_LORA // Ebyte E22 400M30S (SX1268) / 900M30S (SX1262)
#ifdef HAS_1W_LORA // Ebyte E22 400M30S (SX1268) / 900M30S (SX1262) / Ebyte E220 400M30S (LLCC68)
state = radio.setOutputPower(Config.loramodule.power); // max value 20dB for 1W modules as they have Low Noise Amp
radio.setCurrentLimit(140); // to be validated (100 , 120, 140)?
#endif
Expand All @@ -86,7 +86,7 @@ namespace LoRa_Utils {
radio.setCurrentLimit(140);
#endif

#if defined(HAS_SX1262) || defined(HAS_SX1268)
#if defined(HAS_SX1262) || defined(HAS_SX1268) || defined(HAS_LLCC68)
radio.setRxBoostedGainMode(true);
#endif

Expand Down

0 comments on commit be7fe23

Please sign in to comment.