Skip to content

Commit

Permalink
Added pin definitions for Lilygo T3-S3 (SX1262/SX1276/LR1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs authored Dec 5, 2024
1 parent e70d5ef commit 1c14cfc
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions src/WeatherSensorCfg.h.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// WeatherSensorCfg.h.template
//
// Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver
// based on CC1101 or SX1276/RFM95W and ESP32/ESP8266
// based on CC1101, SX1276/RFM95W, SX1262 or LR1121 and ESP32/ESP8266
//
// https://github.com/matthias-bs/BresserWeatherSensorReceiver
//
Expand Down Expand Up @@ -67,6 +67,7 @@
// 20240910 Heltec: Fixed pin definitions
// 20241030 Added pin definitions for Maker Go ESP32C3 Supermini with Heltec HT-RA62
// 20241130 Added pin definitions for Heltec Vision Master T190
// 20241205 Added pin definitions for Lilygo T3-S3 (SX1262/SX1276/LR1121)
//
// ToDo:
// -
Expand Down Expand Up @@ -148,6 +149,12 @@
// in the Arduino IDE:
//#define ARDUINO_TTGO_LoRa32_V21new

// These defines are set by selecting
// "Board: LilyGo T3-S3" / "Board Revision: Radio-SX1262|Radio-SX1276|Radio-LR1121" in the Arduino IDE:
//#define ARDUINO_LILYGO_T3S3_SX1262
//#define ARDUINO_LILYGO_T3S3_SX1276
//#define ARDUINO_LILYGO_T3S3_LR1121

// This define is set by selecting "Board: Heltec Wireless Stick" (SX1276) in the Arduino IDE:
//#define ARDUINO_HELTEC_WIRELESS_STICK

Expand Down Expand Up @@ -203,6 +210,18 @@
#pragma message("ARDUINO_TTGO_LoRa32_V21new defined; using on-board transceiver")
#define USE_SX1276

#elif defined(ARDUINO_LILYGO_T3S3_SX1262)
#pragma message("ARDUINO_LILYGO_T3S3_SX1262 defined; using on-board transceiver")
#define USE_SX1262

#elif defined(ARDUINO_LILYGO_T3S3_SX1276)
#pragma message("ARDUINO_LILYGO_T3S3_SX1276 defined; using on-board transceiver")
#define USE_SX1262

#elif defined(ARDUINO_LILYGO_T3S3_LR1121)
#pragma message("ARDUINO_LILYGO_T3S3_LR1121 defined; using on-board transceiver")
#define USE_LR1121

#elif defined(ARDUINO_HELTEC_WIRELESS_STICK)
#pragma message("ARDUINO_HELTEC_WIRELESS_STICK defined; using on-board transceiver")
#define USE_SX1276 // Heltec Wireless Stick V2
Expand Down Expand Up @@ -288,7 +307,7 @@
// --- Radio Transceiver ---
// ------------------------------------------------------------------------------------------------
// Select type of receiver module (if not yet defined based on the assumptions above)
#if ( !defined(USE_CC1101) && !defined(USE_SX1276) && !defined(USE_SX1262) )
#if ( !defined(USE_CC1101) && !defined(USE_SX1276) && !defined(USE_SX1262) && !defined(USE_LR1121) )
//#define USE_CC1101
#define USE_SX1276
//#define USE_SX1262
Expand Down Expand Up @@ -371,8 +390,10 @@
#define RECEIVER_CHIP "[SX1276]"
#elif defined(USE_SX1262)
#define RECEIVER_CHIP "[SX1262]"
#elif defined(USE_LR1121)
#define RECEIVER_CHIP "[LR1121]
#else
#error "Either USE_CC1101, USE_SX1276 or USE_SX1262 must be defined!"
#error "Either USE_CC1101, USE_SX1276, USE_SX1262 or USE_LR1121 must be defined!"
#endif


Expand Down Expand Up @@ -433,6 +454,21 @@
// RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
#define PIN_RECEIVER_RST LORA_RST

#elif defined(ARDUINO_LILYGO_T3S3_SX1262) || defined(ARDUINO_LILYGO_T3S3_SX1262) || defined(ARDUINO_LILYGO_T3S3_LR1121)
// https://github.com/espressif/arduino-esp32/blob/master/variants/lilygo_t3_s3_sx1262/pins_arduino.h
// https://github.com/espressif/arduino-esp32/blob/master/variants/lilygo_t3_s3_lr1121/pins_arduino.h
// https://github.com/espressif/arduino-esp32/blob/master/variants/lilygo_t3_s3_sx127x/pins_arduino.h
#define PIN_RECEIVER_CS LORA_CS

// CC1101: GDO0 / RFM95W/SX127x: G0 // SX1262: IRQ / LR1121: IRQ
#define PIN_RECEIVER_IRQ LORA_IRQ

// CC1101: GDO2 / RFM95W/SX127x: G1 / SX1262: BUSY / LR1121: BUSY
#define PIN_RECEIVER_GPIO LORA_BUSY

// RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
#define PIN_RECEIVER_RST LORA_RST

#elif defined(ARDUINO_HELTEC_WIRELESS_STICK) || defined(ARDUINO_HELTEC_WIFI_LORA_32_V2)
// Use pinning for Heltec Wireless Stick or WiFi LoRa32 V2, respectively
#define PIN_RECEIVER_CS SS
Expand Down

0 comments on commit 1c14cfc

Please sign in to comment.