From d1ba3140652d4137942a0c15809ee65cf8f03aab Mon Sep 17 00:00:00 2001 From: Vladislav Osmanov <7123463+osmanovv@users.noreply.github.com> Date: Sun, 23 Jan 2022 23:44:58 +0300 Subject: [PATCH] Meshtastic DIY v1.1 new schematic --- platformio.ini | 11 +++++++ variants/diy/v1_1/variant.h | 57 +++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 variants/diy/v1_1/variant.h diff --git a/platformio.ini b/platformio.ini index 951c274e2..ca6c06a0d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -25,6 +25,7 @@ default_envs = tbeam ;default_envs = rak4631 ;default_envs = rak4630 ;default_envs = meshtastic-diy-v1 +;default_envs = meshtastic-diy-v1.1 [common] ; common is not currently used @@ -234,6 +235,16 @@ build_flags = -D EBYTE_E22 -I variants/meshtastic_diy_v1 +; Meshtastic DIY v1.1 new schematic based on ESP32-WROOM-32 & SX1262/SX1268 modules +[env:meshtastic-diy-v1.1] +extends = esp32_base +board = esp32doit-devkit-v1 +build_flags = + ${esp32_base.build_flags} + -D DIY_V1 + -D EBYTE_E22 + -I variants/diy/v1_1 + ; The Heltec Cubecell plus ; IMPORTANT NOTE: This target doesn't yet work and probably won't ever work. I'm keeping it around for now. ; For more details see my post in the forum. diff --git a/variants/diy/v1_1/variant.h b/variants/diy/v1_1/variant.h new file mode 100644 index 000000000..69780219b --- /dev/null +++ b/variants/diy/v1_1/variant.h @@ -0,0 +1,57 @@ +// For OLED LCD +#define I2C_SDA 21 +#define I2C_SCL 22 + +// GPS +#undef GPS_RX_PIN +#define GPS_RX_PIN 15 + +#define BUTTON_PIN 2 // The middle button GPIO on the T-Beam +#define BUTTON_NEED_PULLUP +#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Plugin (#975). + +#define LORA_DIO0 26 // a No connect on the SX1262/SX1268 module +#define LORA_RESET 27 // RST for SX1276, and for SX1262/SX1268 +#define LORA_DIO1 33 // IRQ for SX1262/SX1268 +#define LORA_DIO2 32 // BUSY for SX1262/SX1268 +#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262/SX1268, if DIO3 is high the TXCO is enabled + +// In transmitting, set TXEN as high communication level,RXEN pin is low level; +// In receiving, set RXEN as high communication level, TXEN is lowlevel; +// Before powering off, set TXEN、RXEN as low level. +#define LORA_RXEN 14 // Input - RF switch RX control, connecting external MCU IO, valid in high level +#define LORA_TXEN 13 // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level + +#undef RF95_SCK +#define RF95_SCK 18 +#undef RF95_MISO +#define RF95_MISO 23 +#undef RF95_MOSI +#define RF95_MOSI 19 +#undef RF95_NSS +#define RF95_NSS 5 + +// RX/TX for RFM95/SX127x +#define RF95_RXEN LORA_RXEN +#define RF95_TXEN LORA_TXEN +// #define RF95_TCXO + +// common pinouts for SX126X modules +#define SX126X_CS 5 +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET +#define SX126X_RXEN LORA_RXEN +#define SX126X_TXEN LORA_TXEN + +// supported modules list +#define USE_RF95 // RFM95/SX127x +#define USE_SX1262 +#define USE_SX1268 +#define USE_LLCC68 + +#ifdef EBYTE_E22 +// Internally the TTGO module hooks the SX126x-DIO2 in to control the TX/RX switch +// (which is the default for the sx1262interface code) +#define SX126X_E22 +#endif \ No newline at end of file