From 0e8337292f82358b316978e9013c8b18a45d132a Mon Sep 17 00:00:00 2001 From: "Ricardo Guzman (Richonguzman)" Date: Tue, 10 Mar 2026 23:25:04 -0300 Subject: [PATCH] added Tbeam AXP192 and SX1262 --- src/web_utils.cpp | 2 +- variants/ttgo-t-beam-v1_SX1262/board_pinout.h | 55 +++++++++++++++++++ variants/ttgo-t-beam-v1_SX1262/platformio.ini | 12 ++++ 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 variants/ttgo-t-beam-v1_SX1262/board_pinout.h create mode 100644 variants/ttgo-t-beam-v1_SX1262/platformio.ini diff --git a/src/web_utils.cpp b/src/web_utils.cpp index 8eebfc2..f39273b 100644 --- a/src/web_utils.cpp +++ b/src/web_utils.cpp @@ -98,7 +98,7 @@ namespace WEB_Utils { } void handleReceivedPackets(AsyncWebServerRequest *request) { - StaticJsonDocument<1536> data; + JsonDocument data; for (int i = 0; i < receivedPackets.size(); i++) { data[i]["rxTime"] = receivedPackets[i].rxTime; diff --git a/variants/ttgo-t-beam-v1_SX1262/board_pinout.h b/variants/ttgo-t-beam-v1_SX1262/board_pinout.h new file mode 100644 index 0000000..0ef15eb --- /dev/null +++ b/variants/ttgo-t-beam-v1_SX1262/board_pinout.h @@ -0,0 +1,55 @@ +/* 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_ + + // LoRa Radio + #define HAS_SX1262 + #define HAS_TCXO + #define RADIO_SCLK_PIN 5 + #define RADIO_MISO_PIN 19 + #define RADIO_MOSI_PIN 27 + #define RADIO_CS_PIN 18 + #define RADIO_DIO0_PIN 26 + #define RADIO_RST_PIN 23 + #define RADIO_DIO1_PIN 33 + #define RADIO_BUSY_PIN 32 + #define RADIO_WAKEUP_PIN RADIO_DIO1_PIN + #define GPIO_WAKEUP_PIN GPIO_SEL_33 + + // Display + #define HAS_DISPLAY + + #undef OLED_SDA + #undef OLED_SCL + #undef OLED_RST + + #define OLED_SDA 21 + #define OLED_SCL 22 + #define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin) + + // Aditional Config + #define HAS_AXP192 + + // GPS + #define HAS_GPS + #define GPS_RX 12 + #define GPS_TX 34 + +#endif \ No newline at end of file diff --git a/variants/ttgo-t-beam-v1_SX1262/platformio.ini b/variants/ttgo-t-beam-v1_SX1262/platformio.ini new file mode 100644 index 0000000..9035bd9 --- /dev/null +++ b/variants/ttgo-t-beam-v1_SX1262/platformio.ini @@ -0,0 +1,12 @@ +[env:ttgo-t-beam-v1_SX1262] +board = ttgo-t-beam +build_flags = + ${common.build_flags} + -D RADIOLIB_EXCLUDE_LR11X0=1 + -D RADIOLIB_EXCLUDE_SX127X=1 + -D RADIOLIB_EXCLUDE_SX128X=1 + -D TTGO_T_BEAM_V1_0_SX1262 +lib_deps = + ${common.lib_deps} + ${common.display_libs} + lewisxhe/XPowersLib @ 0.2.4 \ No newline at end of file