Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Board] DIY "t-energy-s3_e22" #4782

Merged
merged 3 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion variants/diy/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,22 @@ build_flags = ${nrf52840_base.build_flags}
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/diy/nrf52_promicro_diy_tcxo>
lib_deps =
${nrf52840_base.lib_deps}
debug_tool = jlink
debug_tool = jlink

; NanoVHF T-Energy-S3 + E22(0)-xxxM - DIY
[env:t-energy-s3_e22]
extends = esp32s3_base
board = esp32-s3-devkitc-1
board_level = extra
board_upload.flash_size = 16MB ;Specify the FLASH capacity as 16MB
board_build.arduino.memory_type = qio_opi ;Enable internal PSRAM
build_unflags =
${esp32s3_base.build_unflags}
-D ARDUINO_USB_MODE=1
build_flags =
${esp32s3_base.build_flags}
-D EBYTE_ESP32_S3
-D BOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=0
-D ARDUINO_USB_CDC_ON_BOOT=1
-I variants/diy/t-energy-s3_e22
46 changes: 46 additions & 0 deletions variants/diy/t-energy-s3_e22/variant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// NanoVHF T-Energy-S3 + E22(0)-xxxM - DIY
// https://github.com/NanoVHF/Meshtastic-DIY/tree/main/PCB/ESP-32-devkit_EBYTE-E22/Mesh-v1.06-TTGO-T18

// Battery
#define BATTERY_PIN 3
#define ADC_MULTIPLIER 2.0
#define ADC_CHANNEL ADC1_GPIO3_CHANNEL

// Button on NanoVHF PCB
#define BUTTON_PIN 39

// I2C via connectors on NanoVHF PCB
#define I2C_SCL 2
#define I2C_SDA 42

// Screen (disabled)
#define HAS_SCREEN 0 // Assume no screen present by default to prevent crash...

// GPS via T-Energy-S3 onboard connector
#define HAS_GPS 1
#define GPS_TX_PIN 43
#define GPS_RX_PIN 44

// LoRa
#define USE_SX1262 // E22-900M30S, E22-900M22S, and E22-900MM22S (not E220!) use SX1262
#define USE_SX1268 // E22-400M30S, E22-400M33S, E22-400M22S, and E22-400MM22S use SX1268

#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // E22 series TCXO reference voltage is 1.8V

#define SX126X_CS 5 // EBYTE module's NSS pin // FIXME: rename to SX126X_SS
#define SX126X_SCK 6 // EBYTE module's SCK pin
#define SX126X_MOSI 13 // EBYTE module's MOSI pin
#define SX126X_MISO 4 // EBYTE module's MISO pin
#define SX126X_RESET 1 // EBYTE module's NRST pin
#define SX126X_BUSY 48 // EBYTE module's BUSY pin
#define SX126X_DIO1 47 // EBYTE module's DIO1 pin

#define SX126X_TXEN 10 // Schematic connects EBYTE module's TXEN pin to MCU
#define SX126X_RXEN 12 // Schematic connects EBYTE module's RXEN pin to MCU

#define LORA_CS SX126X_CS // Compatibility with variant file configuration structure
#define LORA_SCK SX126X_SCK // Compatibility with variant file configuration structure
#define LORA_MOSI SX126X_MOSI // Compatibility with variant file configuration structure
#define LORA_MISO SX126X_MISO // Compatibility with variant file configuration structure
#define LORA_DIO1 SX126X_DIO1 // Compatibility with variant file configuration structure
Loading