mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
ESP32: Initial sort variants by platform (#7340)
This commit is contained in:
18
variants/esp32/betafpv_2400_tx_micro/platformio.ini
Normal file
18
variants/esp32/betafpv_2400_tx_micro/platformio.ini
Normal file
@@ -0,0 +1,18 @@
|
||||
[env:betafpv_2400_tx_micro]
|
||||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
board_level = extra
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D BETAFPV_2400_TX
|
||||
-D VTABLES_IN_FLASH=1
|
||||
-D CONFIG_DISABLE_HAL_LOCKS=1
|
||||
-O2
|
||||
-I variants/esp32/betafpv_2400_tx_micro
|
||||
board_build.f_cpu = 240000000L
|
||||
upload_protocol = esptool
|
||||
;upload_port = /dev/ttyUSB0
|
||||
upload_speed = 460800
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
adafruit/Adafruit NeoPixel @ ^1.12.0
|
||||
37
variants/esp32/betafpv_2400_tx_micro/variant.h
Normal file
37
variants/esp32/betafpv_2400_tx_micro/variant.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// https://betafpv.com/products/elrs-micro-tx-module
|
||||
|
||||
// 0.96" OLED
|
||||
#define I2C_SDA 22
|
||||
#define I2C_SCL 32
|
||||
|
||||
// NO GPS
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 5
|
||||
#define RF95_FAN_EN 17
|
||||
|
||||
// #define LED_PIN 16 // This is a LED_WS2812 not a standard LED
|
||||
#define HAS_NEOPIXEL // Enable the use of neopixels
|
||||
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
|
||||
#define NEOPIXEL_DATA 16 // gpio pin used to send data to the neopixels
|
||||
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
|
||||
|
||||
#define BUTTON_PIN 25
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#undef EXT_NOTIFY_OUT
|
||||
|
||||
// SX128X 2.4 Ghz LoRa module
|
||||
#define USE_SX1280
|
||||
#define LORA_RESET 14
|
||||
#define SX128X_CS 5
|
||||
#define SX128X_DIO1 4
|
||||
#define SX128X_BUSY 21
|
||||
#define SX128X_TXEN 26
|
||||
#define SX128X_RXEN 27
|
||||
#define SX128X_RESET LORA_RESET
|
||||
#define SX128X_MAX_POWER 3
|
||||
17
variants/esp32/betafpv_900_tx_nano/platformio.ini
Normal file
17
variants/esp32/betafpv_900_tx_nano/platformio.ini
Normal file
@@ -0,0 +1,17 @@
|
||||
[env:betafpv_900_tx_nano]
|
||||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
board_level = extra
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D BETAFPV_900_TX_NANO
|
||||
-D VTABLES_IN_FLASH=1
|
||||
-D CONFIG_DISABLE_HAL_LOCKS=1
|
||||
-O2
|
||||
-I variants/esp32/betafpv_900_tx_nano
|
||||
board_build.f_cpu = 240000000L
|
||||
upload_protocol = esptool
|
||||
;upload_port = /dev/ttyUSB0
|
||||
upload_speed = 460800
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
28
variants/esp32/betafpv_900_tx_nano/variant.h
Normal file
28
variants/esp32/betafpv_900_tx_nano/variant.h
Normal file
@@ -0,0 +1,28 @@
|
||||
// https://betafpv.com/products/elrs-nano-tx-module
|
||||
|
||||
// no screen
|
||||
#define HAS_SCREEN 0
|
||||
|
||||
// NO GPS
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
#define USE_RF95
|
||||
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 5
|
||||
|
||||
#define LORA_DIO0 4
|
||||
#define LORA_RESET 14
|
||||
#define LORA_DIO1 2
|
||||
#define LORA_DIO2
|
||||
#define LORA_DIO3
|
||||
|
||||
#define LED_PIN 16 // green - blue is at 17
|
||||
|
||||
#define BUTTON_PIN 25
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#undef EXT_NOTIFY_OUT
|
||||
12
variants/esp32/chatter2/platformio.ini
Normal file
12
variants/esp32/chatter2/platformio.ini
Normal file
@@ -0,0 +1,12 @@
|
||||
; CircuitMess Chatter 2 based on ESP32-WROOM-32 (38 pins) devkit & DeeamLNK DL-LLCC68 or Heltec HT RA62 SX1262/SX1268 module
|
||||
[env:chatter2]
|
||||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D CHATTER_2
|
||||
-I variants/esp32/chatter2
|
||||
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
lovyan03/LovyanGFX@^1.2.0
|
||||
124
variants/esp32/chatter2/variant.h
Normal file
124
variants/esp32/chatter2/variant.h
Normal file
@@ -0,0 +1,124 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Have custom connections or functionality? Configure them in this section //
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Debugging
|
||||
// #define GPS_DEBUG
|
||||
|
||||
// Lora
|
||||
#define USE_LLCC68 // Original Chatter2 with LLCC68 module
|
||||
#define USE_SX1262 // Added for when Lora module is swapped for HT-RA62
|
||||
|
||||
#define SX126X_CS 14 // module's NSS pin
|
||||
#define LORA_SCK 16 // module's SCK pin
|
||||
#define LORA_MOSI 5 // module's MOSI pin
|
||||
#define LORA_MISO 17 // module's MISO pin
|
||||
#define SX126X_RESET RADIOLIB_NC // module's NRST pin
|
||||
#define SX126X_BUSY 4 // module's BUSY pin works for both LLCC68 and RA-62 with cut & jumper
|
||||
#define SX126X_DIO1 18 // module's DIO1 pin
|
||||
#define SX126X_DIO2_AS_RF_SWITCH // module's DIO2 pin
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // module's DIO pin
|
||||
#define SX126X_TXEN RADIOLIB_NC
|
||||
#define SX126X_RXEN RADIOLIB_NC
|
||||
|
||||
// Status
|
||||
// #define LED_PIN 1
|
||||
// External notification
|
||||
// FIXME: Check if EXT_NOTIFY_OUT actualy has any effect and removes the need for setting the external notication pin in the
|
||||
// app/preferences
|
||||
// #define EXT_NOTIFY_OUT 2 // The GPIO pin that acts as the external notification output (here we connect an LED to it)
|
||||
|
||||
// Buzzer
|
||||
#define PIN_BUZZER 19
|
||||
// Buttons
|
||||
// #define BUTTON_PIN 36 // Use the WAKE button as the user button
|
||||
// I2C
|
||||
// #define I2C_SCL 27
|
||||
// #define I2C_SDA 26
|
||||
|
||||
#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice
|
||||
|
||||
// Display
|
||||
|
||||
#define HAS_SCREEN 1 // Assume no screen present by default to prevent crash...
|
||||
|
||||
// ST7735S TFT LCD
|
||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||
#define ST7735_CS -1
|
||||
#define ST7735_RS 33 // DC
|
||||
#define ST7735_SDA 26 // MOSI
|
||||
#define ST7735_SCK 27
|
||||
#define ST7735_RESET 15
|
||||
#define ST7735_MISO -1
|
||||
#define ST7735_BUSY -1
|
||||
#define TFT_BL 32
|
||||
#define ST7735_SPI_HOST HSPI_HOST // SPI2_HOST for S3, auto may work too
|
||||
#define SPI_FREQUENCY 40000000
|
||||
#define SPI_READ_FREQUENCY 16000000
|
||||
#define TFT_HEIGHT 160
|
||||
#define TFT_WIDTH 128
|
||||
#define TFT_OFFSET_X 0
|
||||
#define TFT_OFFSET_Y 0
|
||||
#define TFT_INVERT false
|
||||
#define SCREEN_ROTATE
|
||||
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
|
||||
#define DISPLAY_FORCE_SMALL_FONTS
|
||||
#define TFT_BACKLIGHT_ON LOW
|
||||
|
||||
// Battery
|
||||
|
||||
#define BATTERY_PIN 34 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO34_CHANNEL
|
||||
#define ADC_ATTENUATION \
|
||||
ADC_ATTEN_DB_2_5 // 2_5-> 100mv-1250mv, 11-> 150mv-3100mv for ESP32
|
||||
// ESP32-S2/C3/S3 are different
|
||||
// lower dB for lower voltage rnage
|
||||
#define ADC_MULTIPLIER 5.0 // VBATT---10k--pin34---2.5K---GND
|
||||
// Chatter2 uses 3 AAA cells
|
||||
#define CELL_TYPE_ALKALINE
|
||||
#define NUM_CELLS 3
|
||||
#undef EXT_PWR_DETECT
|
||||
|
||||
// GPS
|
||||
// FIXME: unsure what to define HAS_GPS as if GPS isn't always present
|
||||
#define HAS_GPS 1 // Don't need to set this to 0 to prevent a crash as it doesn't crash if GPS not found, will probe by default
|
||||
// #define PIN_GPS_EN 15
|
||||
// #define GPS_EN_ACTIVE 1
|
||||
#undef GPS_TX_PIN
|
||||
#undef GPS_RX_PIN
|
||||
#define GPS_TX_PIN 13
|
||||
#define GPS_RX_PIN 2
|
||||
|
||||
// keyboard
|
||||
#define INPUTBROKER_SERIAL_TYPE 1
|
||||
#define KB_LOAD 21 // load values from the switch and store in shift register
|
||||
#define KB_CLK 22 // clock pin for serial data out
|
||||
#define KB_DATA 23 // data pin
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// You should have no need to modify the code below, nor in pins_arduino.h //
|
||||
// //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define LORA_CS SX126X_CS // FIXME: for some reason both are used in /src
|
||||
|
||||
// Many of the below values would only be used if USE_RF95 was defined, but it's not as we aren't actually using an RF95, just
|
||||
// that the 4 pins above are named like it If they aren't used they don't need to be defined and doing so cause confusion to those
|
||||
// adapting this file LORA_RESET value is never used in src (as we are not using RF95), so no need to define LORA_DIO0 is not used
|
||||
// in src (as we are not using RF95) as SX1262 does not have it per SX1262 datasheet, so no need to define
|
||||
// FIXME: confirm that the linked lines below are actually only called when using the SX126x or SX128x and no other modules
|
||||
// then use SX126X_DIO1 and SX128X_DIO1 respectively for that purpose, removing the need for RF95-style LORA_* definitions when
|
||||
// the RF95 isn't used
|
||||
#define LORA_DIO1 \
|
||||
SX126X_DIO1 // The old name is used in
|
||||
// https://github.com/meshtastic/firmware/blob/7eff5e7bcb2084499b723c5e3846c15ee089e36d/src/sleep.cpp#L298, so
|
||||
// must also define the old name
|
||||
// LORA_DIO2 value is never used in src (as we are not using RF95), so no need to define, and if DIO2_AS_RF_SWITCH is set then it
|
||||
// cannot serve any extra function even if requested to LORA_DIO3 value is never used in src (as we are not using RF95), so no
|
||||
// need to define, and DIO3_AS_TCXO_AT_1V8 is set so it cannot serve any extra function even if requested to (from 13.3.2.1
|
||||
// DioxMask in SX1262 datasheet: Note that if DIO2 or DIO3 are used to control the RF Switch or the TCXO, the IRQ will not be
|
||||
// generated even if it is mapped to the pins.)
|
||||
11
variants/esp32/diy/dr-dev/platformio.ini
Normal file
11
variants/esp32/diy/dr-dev/platformio.ini
Normal file
@@ -0,0 +1,11 @@
|
||||
; Port to Disaster Radio's ESP32-v3 Dev Board
|
||||
[env:meshtastic-dr-dev]
|
||||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
board_upload.maximum_size = 4194304
|
||||
board_upload.maximum_ram_size = 532480
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D DR_DEV
|
||||
-D EBYTE_E22
|
||||
-I variants/esp32/diy/dr-dev
|
||||
76
variants/esp32/diy/dr-dev/variant.h
Normal file
76
variants/esp32/diy/dr-dev/variant.h
Normal file
@@ -0,0 +1,76 @@
|
||||
// Initialize i2c bus on sd_dat and esp_led pins, respectively. We need a bus to not hang on boot
|
||||
#define HAS_SCREEN 0
|
||||
#define I2C_SDA 4
|
||||
#define I2C_SCL 5
|
||||
#define BATTERY_PIN 34
|
||||
#define ADC_CHANNEL ADC1_GPIO34_CHANNEL
|
||||
|
||||
// GPS
|
||||
#undef GPS_RX_PIN
|
||||
#define GPS_RX_PIN NOT_A_PIN
|
||||
#define HAS_GPS 0
|
||||
|
||||
#define BUTTON_PIN 13 // 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 Module (#975).
|
||||
|
||||
#define LORA_DIO0 NOT_A_PIN // a No connect on the SX1262/SX1268 module
|
||||
#define LORA_RESET NOT_A_PIN // RST for SX1276, and for SX1262/SX1268
|
||||
#define LORA_DIO3 NOT_A_PIN // Not connected on PCB, but internally on the 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.
|
||||
|
||||
#undef LORA_SCK
|
||||
#define LORA_SCK 18
|
||||
#undef LORA_MISO
|
||||
#define LORA_MISO 19
|
||||
#undef LORA_MOSI
|
||||
#define LORA_MOSI 23
|
||||
|
||||
// PINS FOR THE 900M22S
|
||||
|
||||
#define LORA_DIO1 26 // IRQ for SX1262/SX1268
|
||||
#define LORA_DIO2 22 // BUSY for SX1262/SX1268
|
||||
// NOT_A_PIN is treated as RADIOLIB_NC due to how they are defined, best to use RADIOLIB_NC directly
|
||||
#define LORA_TXEN RADIOLIB_NC // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level
|
||||
// E22_TXEN_CONNECTED_TO_DIO2 wasn't defined, so RXEN wasn't controlled. Commented it out to maintain behavior, but shouldn't be.
|
||||
// Need to comment out defining SX126X_RXEN as LORA_RXEN too
|
||||
// #define LORA_RXEN 17 // Input - RF switch RX control, connecting external MCU IO, valid in high level
|
||||
#undef LORA_CS
|
||||
#define LORA_CS 16
|
||||
#define SX126X_BUSY 22
|
||||
#define SX126X_CS 16
|
||||
|
||||
// PINS FOR THE 900M30S
|
||||
/*
|
||||
#define LORA_DIO1 27 // IRQ for SX1262/SX1268
|
||||
#define LORA_DIO2 35 // BUSY for SX1262/SX1268
|
||||
#define LORA_TXEN NOT_A_PIN // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level
|
||||
#define LORA_RXEN 21 // Input - RF switch RX control, connecting external MCU IO, valid in high level
|
||||
#undef LORA_CS
|
||||
#define LORA_CS 33
|
||||
#define SX126X_BUSY 35
|
||||
#define SX126X_CS 33
|
||||
*/
|
||||
|
||||
// RX/TX for RFM95/SX127x
|
||||
// #define RF95_RXEN LORA_RXEN
|
||||
#define RF95_TXEN LORA_TXEN
|
||||
// #define RF95_TCXO <GPIO#>
|
||||
|
||||
// common pinouts for SX126X modules
|
||||
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#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
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
8
variants/esp32/diy/hydra/platformio.ini
Normal file
8
variants/esp32/diy/hydra/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
||||
; Hydra - Meshtastic DIY v1 hardware with some specific changes
|
||||
[env:hydra]
|
||||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D DIY_V1
|
||||
-I variants/esp32/diy/hydra
|
||||
47
variants/esp32/diy/hydra/variant.h
Normal file
47
variants/esp32/diy/hydra/variant.h
Normal file
@@ -0,0 +1,47 @@
|
||||
// For OLED LCD
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
// For GPS, 'undef's not needed
|
||||
#define GPS_TX_PIN 15
|
||||
#define GPS_RX_PIN 12
|
||||
#define PIN_GPS_EN 4
|
||||
#define GPS_POWER_TOGGLE // Moved definition from platformio.ini to here
|
||||
|
||||
#define BUTTON_PIN 39 // The middle button GPIO on the T-Beam
|
||||
// Note: On the ESP32 base version, gpio34-39 are input-only, and do not have internal pull-ups.
|
||||
// If 39 is not being used for a button, it is suggested to remove the #define.
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
#define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k)
|
||||
#define EXT_PWR_DETECT 4 // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards
|
||||
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).
|
||||
#define LED_PIN 2 // add status LED (compatible with core-pcb and DIY targets)
|
||||
|
||||
// Radio
|
||||
#define USE_SX1262 // E22-900M30S uses SX1262
|
||||
#define USE_SX1268 // E22-400M30S uses SX1268
|
||||
#define SX126X_MAX_POWER \
|
||||
22 // Outputting 22dBm from SX1262 results in ~30dBm E22-900M30S output (module only uses last stage of the YP2233W PA)
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // E22 series TCXO reference voltage is 1.8V
|
||||
|
||||
#define SX126X_CS 18 // EBYTE module's NSS pin
|
||||
#define SX126X_SCK 5 // EBYTE module's SCK pin
|
||||
#define SX126X_MOSI 27 // EBYTE module's MOSI pin
|
||||
#define SX126X_MISO 19 // EBYTE module's MISO pin
|
||||
#define SX126X_RESET 23 // EBYTE module's NRST pin
|
||||
#define SX126X_BUSY 32 // EBYTE module's BUSY pin
|
||||
#define SX126X_DIO1 33 // EBYTE module's DIO1 pin
|
||||
|
||||
#define SX126X_TXEN 13 // Schematic connects EBYTE module's TXEN pin to MCU
|
||||
#define SX126X_RXEN 14 // 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
|
||||
#define LORA_TXEN SX126X_TXEN // Compatibility with variant file configuration structure
|
||||
#define LORA_RXEN SX126X_RXEN // Compatibility with variant file configuration structure
|
||||
#define LORA_RESET SX126X_RESET // Compatibility with variant file configuration structure
|
||||
#define LORA_DIO2 SX126X_BUSY // Compatibility with variant file configuration structure
|
||||
10
variants/esp32/diy/v1/platformio.ini
Normal file
10
variants/esp32/diy/v1/platformio.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
; Meshtastic DIY v1 by Nano VHF Schematic based on ESP32-WROOM-32 (38 pins) devkit & EBYTE E22 SX1262/SX1268 module
|
||||
[env:meshtastic-diy-v1]
|
||||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
board_check = true
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D DIY_V1
|
||||
-D EBYTE_E22
|
||||
-I variants/esp32/diy/v1
|
||||
57
variants/esp32/diy/v1/variant.h
Normal file
57
variants/esp32/diy/v1/variant.h
Normal file
@@ -0,0 +1,57 @@
|
||||
// For OLED LCD
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
// GPS
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 12
|
||||
#define GPS_TX_PIN 15
|
||||
#define GPS_UBLOX
|
||||
|
||||
#define BUTTON_PIN 39 // The middle button GPIO on the T-Beam
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
#define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k)
|
||||
#define EXT_PWR_DETECT 4 // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards
|
||||
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).
|
||||
#define LED_PIN 2 // add status LED (compatible with core-pcb and DIY targets)
|
||||
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262/SX1268 module
|
||||
#define LORA_RESET 23 // 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
|
||||
|
||||
#define LORA_SCK 5
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 27
|
||||
#define LORA_CS 18
|
||||
|
||||
// supported modules list
|
||||
#define USE_RF95 // RFM95/SX127x
|
||||
#define USE_SX1262
|
||||
#define USE_SX1268
|
||||
#define USE_LLCC68
|
||||
|
||||
// common pinouts for SX126X modules
|
||||
#define SX126X_CS 18 // NSS for SX126X
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_RXEN RADIOLIB_NC // Defining the RXEN ruins RFSwitching for the E22 900M30S in RadioLib
|
||||
#define SX126X_TXEN 13
|
||||
|
||||
// RX/TX for RFM95/SX127x
|
||||
#define RF95_RXEN 14
|
||||
#define RF95_TXEN 13
|
||||
|
||||
// Set lora.tx_power to 13 for Hydra or other E22 900M30S target due to PA
|
||||
#define SX126X_MAX_POWER 22
|
||||
|
||||
#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_DIO3_TCXO_VOLTAGE 1.8
|
||||
#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL
|
||||
#endif
|
||||
10
variants/esp32/diy/v1_1/platformio.ini
Normal file
10
variants/esp32/diy/v1_1/platformio.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
; 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
|
||||
board_level = extra
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D DIY_V1
|
||||
-D EBYTE_E22
|
||||
-I variants/esp32/diy/v1_1
|
||||
58
variants/esp32/diy/v1_1/variant.h
Normal file
58
variants/esp32/diy/v1_1/variant.h
Normal file
@@ -0,0 +1,58 @@
|
||||
// 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 Module (#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 LORA_SCK
|
||||
#define LORA_SCK 18
|
||||
#undef LORA_MISO
|
||||
#define LORA_MISO 19
|
||||
#undef LORA_MOSI
|
||||
#define LORA_MOSI 23
|
||||
#undef LORA_CS
|
||||
#define LORA_CS 5
|
||||
|
||||
// RX/TX for RFM95/SX127x
|
||||
#define RF95_RXEN LORA_RXEN
|
||||
#define RF95_TXEN LORA_TXEN
|
||||
// #define RF95_TCXO <GPIO#>
|
||||
|
||||
// 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_DIO3_TCXO_VOLTAGE 1.8
|
||||
#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL
|
||||
#endif
|
||||
12
variants/esp32/hackerboxes_esp32_io/platformio.ini
Normal file
12
variants/esp32/hackerboxes_esp32_io/platformio.ini
Normal file
@@ -0,0 +1,12 @@
|
||||
[env:hackerboxes-esp32-io]
|
||||
extends = esp32_base
|
||||
board = esp32dev
|
||||
board_level = extra
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-I variants/esp32/hackerboxes_esp32_io
|
||||
monitor_speed = 115200
|
||||
upload_protocol = esptool
|
||||
;upload_port = /dev/ttyUSB0
|
||||
upload_speed = 921600
|
||||
30
variants/esp32/hackerboxes_esp32_io/variant.h
Normal file
30
variants/esp32/hackerboxes_esp32_io/variant.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
// HACKBOX LoRa IO Kit
|
||||
// Uses a ESP-32-WROOM and a RA-01SH (SX1262) LoRa Board
|
||||
|
||||
#define LED_PIN 2 // LED
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
|
||||
#define HAS_SCREEN 0
|
||||
#define HAS_GPS 0
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
#define USE_SX1262
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 5
|
||||
#define LORA_DIO0 RADIOLIB_NC
|
||||
#define LORA_RESET 27
|
||||
#define LORA_DIO1 33
|
||||
#define LORA_DIO2 RADIOLIB_NC
|
||||
#define LORA_BUSY 32
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_BUSY
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_MAX_POWER 22 // Max power of the RA-01SH is 22db
|
||||
9
variants/esp32/heltec_v1/platformio.ini
Normal file
9
variants/esp32/heltec_v1/platformio.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[env:heltec-v1]
|
||||
;build_type = debug ; to make it possible to step through our jtag debugger
|
||||
extends = esp32_base
|
||||
board_level = extra
|
||||
board = heltec_wifi_lora_32
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D HELTEC_V1
|
||||
-I variants/esp32/heltec_v1
|
||||
31
variants/esp32/heltec_v1/variant.h
Normal file
31
variants/esp32/heltec_v1/variant.h
Normal file
@@ -0,0 +1,31 @@
|
||||
// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine.
|
||||
// Tested on Neo6m module.
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 36
|
||||
#define GPS_TX_PIN 33
|
||||
|
||||
#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag
|
||||
#define I2C_SDA 4 // I2C pins for this board
|
||||
#define I2C_SCL 15
|
||||
#endif
|
||||
|
||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
||||
|
||||
#define LED_PIN 25 // If defined we will blink this LED
|
||||
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#ifndef USE_JTAG
|
||||
#define LORA_RESET 14
|
||||
#endif
|
||||
#define LORA_DIO1 RADIOLIB_NC
|
||||
#define LORA_DIO2 32 // Not really used
|
||||
|
||||
// ratio of voltage divider = 3.20 (R1=100k, R2=220k)
|
||||
#define ADC_MULTIPLIER 3.2
|
||||
|
||||
#define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC2_GPIO13_CHANNEL
|
||||
#define BAT_MEASURE_ADC_UNIT 2
|
||||
10
variants/esp32/heltec_v2.1/platformio.ini
Normal file
10
variants/esp32/heltec_v2.1/platformio.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
[env:heltec-v2_1]
|
||||
board_level = extra
|
||||
;build_type = debug ; to make it possible to step through our jtag debugger
|
||||
extends = esp32_base
|
||||
board = heltec_wifi_lora_32_V2
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D HELTEC_V2_1
|
||||
-I variants/esp32/heltec_v2.1
|
||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
37
variants/esp32/heltec_v2.1/variant.h
Normal file
37
variants/esp32/heltec_v2.1/variant.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Pin planning should refer to this document
|
||||
// https://resource.heltec.cn/download/WiFi_LoRa_32/WIFI_LoRa_32_V2.pdf
|
||||
|
||||
// the default ESP32 Pin of 15 is the Oled SCL, 37 is battery pin.
|
||||
// Tested on Neo6m module.
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 36
|
||||
#define GPS_TX_PIN 33
|
||||
|
||||
#define PIN_GPS_EN 37 // GPS power enable pin
|
||||
|
||||
#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag
|
||||
#define I2C_SDA 4 // I2C pins for this board
|
||||
#define I2C_SCL 15
|
||||
#endif
|
||||
|
||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
||||
|
||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
||||
#define LED_PIN 25 // If defined we will blink this LED
|
||||
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#ifndef USE_JTAG
|
||||
#define LORA_RESET 14
|
||||
#endif
|
||||
#define LORA_DIO1 35 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
|
||||
#define LORA_DIO2 34 // Not really used
|
||||
|
||||
#define ADC_MULTIPLIER 3.2 // 220k + 100k (320k/100k=3.2)
|
||||
// #define ADC_WIDTH ADC_WIDTH_BIT_10
|
||||
|
||||
#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO37_CHANNEL
|
||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
||||
9
variants/esp32/heltec_v2/platformio.ini
Normal file
9
variants/esp32/heltec_v2/platformio.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[env:heltec-v2_0]
|
||||
;build_type = debug ; to make it possible to step through our jtag debugger
|
||||
board_level = extra
|
||||
extends = esp32_base
|
||||
board = heltec_wifi_lora_32_V2
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D HELTEC_V2_0
|
||||
-I variants/esp32/heltec_v2
|
||||
31
variants/esp32/heltec_v2/variant.h
Normal file
31
variants/esp32/heltec_v2/variant.h
Normal file
@@ -0,0 +1,31 @@
|
||||
// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine.
|
||||
// Tested on Neo6m module.
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 36
|
||||
#define GPS_TX_PIN 33
|
||||
|
||||
#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag
|
||||
#define I2C_SDA 4 // I2C pins for this board
|
||||
#define I2C_SCL 15
|
||||
#endif
|
||||
|
||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
||||
|
||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
||||
#define LED_PIN 25 // If defined we will blink this LED
|
||||
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#ifndef USE_JTAG
|
||||
#define LORA_RESET 14
|
||||
#endif
|
||||
#define LORA_DIO1 35 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
|
||||
#define LORA_DIO2 34 // Not really used
|
||||
|
||||
// ratio of voltage divider = 3.20 (R12=100k, R10=220k)
|
||||
#define ADC_MULTIPLIER 3.2
|
||||
#define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC2_GPIO13_CHANNEL
|
||||
#define BAT_MEASURE_ADC_UNIT 2
|
||||
23
variants/esp32/heltec_wireless_bridge/platformio.ini
Normal file
23
variants/esp32/heltec_wireless_bridge/platformio.ini
Normal file
@@ -0,0 +1,23 @@
|
||||
[env:heltec-wireless-bridge]
|
||||
;build_type = debug ; to make it possible to step through our jtag debugger
|
||||
extends = esp32_base
|
||||
board = heltec_wifi_lora_32
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-I variants/esp32/heltec_wireless_bridge
|
||||
-D HELTEC_WIRELESS_BRIDGE
|
||||
-D BOARD_HAS_PSRAM
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
|
||||
-D MESHTASTIC_EXCLUDE_DETECTIONSENSOR=1
|
||||
-D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
|
||||
-D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL=1
|
||||
-D MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION=1
|
||||
-D MESHTASTIC_EXCLUDE_GPS=1
|
||||
-D MESHTASTIC_EXCLUDE_I2C=1
|
||||
-D MESHTASTIC_EXCLUDE_INPUTBROKER=1
|
||||
-D MESHTASTIC_EXCLUDE_POWER_FSM=1
|
||||
-D MESHTASTIC_EXCLUDE_SERIAL=1
|
||||
-D MESHTASTIC_EXCLUDE_SCREEN=1
|
||||
-D MESHTASTIC_EXCLUDE_WAYPOINT=1
|
||||
41
variants/esp32/heltec_wireless_bridge/variant.h
Normal file
41
variants/esp32/heltec_wireless_bridge/variant.h
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
// updated variant 20250420 berlincount, tested with HTIT-TB
|
||||
//
|
||||
// connections in HTIT-WB
|
||||
// per https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
|
||||
// md5: a0e6ae10ff76611aa61433366b2e4f5c esp32_datasheet_en.pdf
|
||||
// per https://resource.heltec.cn/download/Wireless_Bridge/Schematic_Diagram_HTIT-WB_V0.2.pdf
|
||||
// md5: d5c1b0219ece347dd8cee866d7d3ab0a Schematic_Diagram_HTIT-WB_V0.2.pdf
|
||||
|
||||
#define NO_EXT_GPIO 1
|
||||
#define NO_GPS 1
|
||||
|
||||
#define HAS_GPS 0 // GPS is not equipped
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
// Green / Lora = PIN 22 / GPIO2, Yellow / Wifi = PIN 23 / GPIO0, Blue / BLE = PIN 25 / GPIO16
|
||||
#define LED_PIN 22
|
||||
#define WIFI_LED 23
|
||||
#define BLE_LED 25
|
||||
|
||||
// ESP32-D0WDQ6 direct pins SX1276
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26
|
||||
#define LORA_DIO1 35
|
||||
#define LORA_DIO2 34
|
||||
#define LORA_SCK 05
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 27
|
||||
#define LORA_CS 18
|
||||
|
||||
// several things are not possible with JTAG enabled
|
||||
#ifndef USE_JTAG
|
||||
#define LORA_RESET 14 // LoRa Reset shares a pin with MTMS
|
||||
#define I2C_SDA 4 // SD_DATA1 going to W25Q64, but
|
||||
#define I2C_SCL 15 // SD_CMD shared a pin with MTD0
|
||||
#endif
|
||||
|
||||
// user button is present on device, but currently untested & unconfigured - couldn't figure out how it's connected
|
||||
|
||||
// battery support is present within device, but currently untested & unconfigured - couldn't find reliable information yet
|
||||
9
variants/esp32/heltec_wsl_v2.1/platformio.ini
Normal file
9
variants/esp32/heltec_wsl_v2.1/platformio.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[env:heltec-wsl-v2_1]
|
||||
extends = esp32_base
|
||||
board = heltec_wireless_stick_lite
|
||||
board_level = extra
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-I variants/esp32/heltec_wsl_v2.1
|
||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
29
variants/esp32/heltec_wsl_v2.1/variant.h
Normal file
29
variants/esp32/heltec_wsl_v2.1/variant.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#define I2C_SCL SCL
|
||||
#define I2C_SDA SDA
|
||||
|
||||
#define LED_PIN LED
|
||||
|
||||
// active low, powers the Battery reader, but no lora antenna boost (?)
|
||||
// #define VEXT_ENABLE Vext
|
||||
// #define VEXT_ON_VALUE LOW
|
||||
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define ADC_CTRL 21
|
||||
#define ADC_CTRL_ENABLED LOW
|
||||
#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_CHANNEL_1
|
||||
// ratio of voltage divider = 3.20 (R1=100k, R2=220k)
|
||||
#define ADC_MULTIPLIER 3.2
|
||||
|
||||
#define USE_RF95 // RFM95/SX127x
|
||||
|
||||
#define LORA_DIO0 26
|
||||
#define LORA_RESET 14
|
||||
#define LORA_DIO1 35
|
||||
#define LORA_DIO2 34
|
||||
|
||||
#define LORA_SCK 5
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 27
|
||||
#define LORA_CS 18
|
||||
47
variants/esp32/m5stack_core/pins_arduino.h
Normal file
47
variants/esp32/m5stack_core/pins_arduino.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t TX = 1;
|
||||
static const uint8_t RX = 3;
|
||||
|
||||
static const uint8_t TXD2 = 17;
|
||||
static const uint8_t RXD2 = 16;
|
||||
|
||||
static const uint8_t SDA = 21;
|
||||
static const uint8_t SCL = 22;
|
||||
|
||||
static const uint8_t SS = 5;
|
||||
static const uint8_t MOSI = 23;
|
||||
static const uint8_t MISO = 19;
|
||||
static const uint8_t SCK = 18;
|
||||
|
||||
static const uint8_t G23 = 23;
|
||||
static const uint8_t G19 = 19;
|
||||
static const uint8_t G18 = 18;
|
||||
static const uint8_t G3 = 3;
|
||||
static const uint8_t G16 = 16;
|
||||
static const uint8_t G21 = 21;
|
||||
static const uint8_t G2 = 2;
|
||||
static const uint8_t G12 = 12;
|
||||
static const uint8_t G15 = 15;
|
||||
static const uint8_t G35 = 35;
|
||||
static const uint8_t G36 = 36;
|
||||
static const uint8_t G25 = 25;
|
||||
static const uint8_t G26 = 26;
|
||||
static const uint8_t G1 = 1;
|
||||
static const uint8_t G17 = 17;
|
||||
static const uint8_t G22 = 22;
|
||||
static const uint8_t G5 = 5;
|
||||
static const uint8_t G13 = 13;
|
||||
static const uint8_t G0 = 0;
|
||||
static const uint8_t G34 = 34;
|
||||
|
||||
static const uint8_t DAC1 = 25;
|
||||
static const uint8_t DAC2 = 26;
|
||||
|
||||
static const uint8_t ADC1 = 35;
|
||||
static const uint8_t ADC2 = 36;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
29
variants/esp32/m5stack_core/platformio.ini
Normal file
29
variants/esp32/m5stack_core/platformio.ini
Normal file
@@ -0,0 +1,29 @@
|
||||
[env:m5stack-core]
|
||||
extends = esp32_base
|
||||
board = m5stack-core-esp32
|
||||
monitor_filters = esp32_exception_decoder
|
||||
build_src_filter =
|
||||
${esp32_base.build_src_filter}
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-I variants/esp32/m5stack_core
|
||||
-DILI9341_DRIVER
|
||||
-DM5STACK
|
||||
-DUSER_SETUP_LOADED
|
||||
-DTFT_SDA_READ
|
||||
-DTFT_DRIVER=0x9341
|
||||
-DTFT_MISO=19
|
||||
-DTFT_MOSI=23
|
||||
-DTFT_SCLK=18
|
||||
-DTFT_CS=14
|
||||
-DTFT_DC=27
|
||||
-DTFT_RST=33
|
||||
-DTFT_BL=32
|
||||
-DSPI_FREQUENCY=40000000
|
||||
-DSPI_READ_FREQUENCY=16000000
|
||||
-DDISABLE_ALL_LIBRARY_WARNINGS
|
||||
lib_ignore =
|
||||
m5stack-core
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
lovyan03/LovyanGFX@^1.2.0
|
||||
46
variants/esp32/m5stack_core/variant.h
Normal file
46
variants/esp32/m5stack_core/variant.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
||||
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
// #define BUTTON_PIN 39 // 38, 37
|
||||
// #define BUTTON_PIN 0
|
||||
#define BUTTON_NEED_PULLUP
|
||||
// #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
|
||||
|
||||
#define BUTTON_PIN 38
|
||||
|
||||
#define PIN_BUZZER 25
|
||||
|
||||
#undef LORA_SCK
|
||||
#undef LORA_MISO
|
||||
#undef LORA_MOSI
|
||||
#undef LORA_CS
|
||||
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 5
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 36 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 26
|
||||
#define LORA_DIO1 RADIOLIB_NC // Not really used
|
||||
#define LORA_DIO2 RADIOLIB_NC // Not really used
|
||||
|
||||
// This board has different GPS pins than all other boards
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 16
|
||||
#define GPS_TX_PIN 17
|
||||
|
||||
#define TFT_HEIGHT 240
|
||||
#define TFT_WIDTH 320
|
||||
#define TFT_OFFSET_X 0
|
||||
#define TFT_OFFSET_Y 0
|
||||
#define TFT_BUSY -1
|
||||
|
||||
// LCD screens are slow, so slowdown the wipe so it looks better
|
||||
#define SCREEN_TRANSITION_FRAMERATE 1 // fps
|
||||
|
||||
#define ILI9341_SPI_HOST VSPI_HOST // VSPI_HOST or HSPI_HOST
|
||||
49
variants/esp32/m5stack_coreink/pins_arduino.h
Normal file
49
variants/esp32/m5stack_coreink/pins_arduino.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define TX2 -1
|
||||
#define RX2 -1
|
||||
|
||||
static const uint8_t TX = 1;
|
||||
static const uint8_t RX = 3;
|
||||
|
||||
static const uint8_t SDA = 32;
|
||||
static const uint8_t SCL = 33;
|
||||
|
||||
static const uint8_t SS = 9;
|
||||
static const uint8_t MOSI = 23;
|
||||
static const uint8_t MISO = 34;
|
||||
static const uint8_t SCK = 18;
|
||||
|
||||
static const uint8_t G26 = 26;
|
||||
static const uint8_t G36 = 36;
|
||||
static const uint8_t G25 = 25;
|
||||
|
||||
static const uint8_t G32 = 32;
|
||||
static const uint8_t G33 = 33;
|
||||
|
||||
static const uint8_t G21 = 21;
|
||||
static const uint8_t G22 = 22;
|
||||
|
||||
static const uint8_t G13 = 13;
|
||||
static const uint8_t G14 = 14;
|
||||
|
||||
static const uint8_t G12 = 12;
|
||||
static const uint8_t G19 = 19;
|
||||
|
||||
static const uint8_t G5 = 5;
|
||||
static const uint8_t G10 = 10;
|
||||
static const uint8_t G2 = 2;
|
||||
static const uint8_t G37 = 37;
|
||||
static const uint8_t G38 = 38;
|
||||
static const uint8_t G39 = 39;
|
||||
|
||||
static const uint8_t DAC1 = 25;
|
||||
static const uint8_t DAC2 = 26;
|
||||
|
||||
static const uint8_t ADC1 = 35;
|
||||
static const uint8_t ADC2 = 36;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
28
variants/esp32/m5stack_coreink/platformio.ini
Normal file
28
variants/esp32/m5stack_coreink/platformio.ini
Normal file
@@ -0,0 +1,28 @@
|
||||
[env:m5stack-coreink]
|
||||
extends = esp32_base
|
||||
board = m5stack-coreink
|
||||
board_check = true
|
||||
build_src_filter =
|
||||
${esp32_base.build_src_filter}
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-I variants/esp32/m5stack_coreink
|
||||
;-D RADIOLIB_VERBOSE
|
||||
-Ofast
|
||||
-D__MCUXPRESSO
|
||||
-DEINK_DISPLAY_MODEL=GxEPD2_154_M09
|
||||
-DEINK_WIDTH=200
|
||||
-DEINK_HEIGHT=200
|
||||
-DUSER_SETUP_LOADED
|
||||
-DM5_COREINK
|
||||
-DM5STACK
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
zinggjm/GxEPD2@^1.6.2
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
lib_ignore =
|
||||
m5stack-coreink
|
||||
monitor_filters = esp32_exception_decoder
|
||||
board_build.f_cpu = 240000000L
|
||||
upload_protocol = esptool
|
||||
upload_port = /dev/ttyACM0
|
||||
109
variants/esp32/m5stack_coreink/variant.h
Normal file
109
variants/esp32/m5stack_coreink/variant.h
Normal file
@@ -0,0 +1,109 @@
|
||||
// Primary I2C Bus includes PCF8563 RTC Module
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define HAS_GPS 1
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
// Use Secondary I2C Bus as GPS Serial
|
||||
#define GPS_RX_PIN 33
|
||||
// #define GPS_TX_PIN 32 (now used by SX1262 BUSY as GPS works with just RX)
|
||||
|
||||
// Green LED
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
#define LED_PIN 10
|
||||
|
||||
#include "pcf8563.h"
|
||||
// PCF8563 RTC Module
|
||||
#define PCF8563_RTC 0x51
|
||||
#define HAS_RTC 1
|
||||
|
||||
// Wheel
|
||||
// Down 37
|
||||
// Push 38
|
||||
// Up 39
|
||||
// Top Physical Button 5
|
||||
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define BUTTON_PIN 5
|
||||
|
||||
// BUZZER
|
||||
#define PIN_BUZZER 2
|
||||
|
||||
#undef LORA_SCK
|
||||
#undef LORA_MISO
|
||||
#undef LORA_MOSI
|
||||
#undef LORA_CS
|
||||
|
||||
#define USE_RF95
|
||||
// #define USE_SX1262
|
||||
// #define USE_SX1280
|
||||
|
||||
#ifdef USE_RF95
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 34
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 14
|
||||
#define LORA_DIO0 25
|
||||
#define LORA_RESET 26
|
||||
#define LORA_DIO1 RADIOLIB_NC
|
||||
#define LORA_DIO2 RADIOLIB_NC
|
||||
#endif
|
||||
|
||||
// https://www.waveshare.com/core1262-868m.htm
|
||||
#ifdef USE_SX1262
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 34
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 14
|
||||
#define LORA_RESET 26
|
||||
#define LORA_DIO1 25
|
||||
#define LORA_DIO2 32 // 33 // (13 not working) //BUSY pin on SX1262
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif
|
||||
|
||||
#ifdef USE_SX1280
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 34
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 14
|
||||
#define LORA_RESET 26
|
||||
#define LORA_DIO1 25
|
||||
#define LORA_DIO2 13
|
||||
#define SX128X_CS LORA_CS
|
||||
#define SX128X_DIO1 LORA_DIO1
|
||||
#define SX128X_BUSY LORA_DIO2
|
||||
#define SX128X_RESET LORA_RESET
|
||||
#define SX128X_MAX_POWER 13 // 10
|
||||
#endif
|
||||
|
||||
#define USE_EINK
|
||||
// https://docs.m5stack.com/en/core/coreink
|
||||
// https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/coreink/coreink_sch.pdf
|
||||
#define PIN_EINK_EN -1 // N/C
|
||||
#define PIN_EINK_CS 9 // EPD_CS
|
||||
#define PIN_EINK_BUSY 4 // EPD_BUSY
|
||||
#define PIN_EINK_DC 15 // EPD_D/C
|
||||
#define PIN_EINK_RES -1 // Connected but not needed
|
||||
#define PIN_EINK_SCLK 18 // EPD_SCLK
|
||||
#define PIN_EINK_MOSI 23 // EPD_MOSI
|
||||
|
||||
#define BATTERY_PIN 35
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
// https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/m5paper/M5_PAPER_SCH.pdf
|
||||
// https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58
|
||||
// VBAT
|
||||
// |
|
||||
// R83 (3K)
|
||||
// +
|
||||
// R86 (11K)
|
||||
// |
|
||||
// GND
|
||||
// https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58
|
||||
#define ADC_MULTIPLIER 5
|
||||
// https://embeddedexplorer.com/esp32-adc-esp-idf-tutorial/
|
||||
10
variants/esp32/nano-g1-explorer/platformio.ini
Normal file
10
variants/esp32/nano-g1-explorer/platformio.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
; The 1.0 release of the nano-g1-explorer board
|
||||
[env:nano-g1-explorer]
|
||||
extends = esp32_base
|
||||
board = ttgo-t-beam
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D NANO_G1_EXPLORER
|
||||
-I variants/esp32/nano-g1-explorer
|
||||
40
variants/esp32/nano-g1-explorer/variant.h
Normal file
40
variants/esp32/nano-g1-explorer/variant.h
Normal file
@@ -0,0 +1,40 @@
|
||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
||||
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define BUTTON_PIN 36 // The user button (information button) GPIO on the Nano G1 explorer
|
||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
||||
|
||||
// common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
||||
// not found then probe for SX1262
|
||||
#define USE_RF95
|
||||
#define USE_SX1262
|
||||
|
||||
#define GPS_RX_PIN 34
|
||||
#define GPS_TX_PIN 12
|
||||
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 23
|
||||
#define LORA_DIO1 33 // SX1262 IRQ
|
||||
#define LORA_DIO2 32 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
// Not really an E22
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
// Internally the module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
|
||||
// code)
|
||||
#endif
|
||||
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity.
|
||||
#define ADC_MULTIPLIER 2
|
||||
|
||||
#define USE_SH1107_128_64
|
||||
10
variants/esp32/nano-g1/platformio.ini
Normal file
10
variants/esp32/nano-g1/platformio.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
; The 1.0 release of the nano-g1 board
|
||||
[env:nano-g1]
|
||||
extends = esp32_base
|
||||
board = ttgo-t-beam
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D NANO_G1
|
||||
-I variants/esp32/nano-g1
|
||||
36
variants/esp32/nano-g1/variant.h
Normal file
36
variants/esp32/nano-g1/variant.h
Normal file
@@ -0,0 +1,36 @@
|
||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
||||
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define BUTTON_PIN 36 // The middle button GPIO on the Nano G1
|
||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
||||
|
||||
// common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
||||
// not found then probe for SX1262
|
||||
#define USE_RF95
|
||||
#define USE_SX1262
|
||||
|
||||
#define GPS_RX_PIN 34
|
||||
#define GPS_TX_PIN 12
|
||||
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 23
|
||||
#define LORA_DIO1 33 // SX1262 IRQ
|
||||
#define LORA_DIO2 32 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
// Not really an E22
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
// Internally the module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
|
||||
// code)
|
||||
#endif
|
||||
|
||||
// different screen
|
||||
#define USE_SH1106
|
||||
16
variants/esp32/radiomaster_900_bandit/platformio.ini
Normal file
16
variants/esp32/radiomaster_900_bandit/platformio.ini
Normal file
@@ -0,0 +1,16 @@
|
||||
[env:radiomaster_900_bandit]
|
||||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-DRADIOMASTER_900_BANDIT
|
||||
-DVTABLES_IN_FLASH=1
|
||||
-DCONFIG_DISABLE_HAL_LOCKS=1
|
||||
-DHAS_STK8XXX=1
|
||||
-O2
|
||||
-I variants/esp32/radiomaster_900_bandit
|
||||
board_build.f_cpu = 240000000L
|
||||
upload_protocol = esptool
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
https://github.com/gjelsoe/STK8xxx-Accelerometer/archive/v0.1.1.zip
|
||||
126
variants/esp32/radiomaster_900_bandit/variant.h
Normal file
126
variants/esp32/radiomaster_900_bandit/variant.h
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
Initial settings and work by https://github.com/gjelsoe
|
||||
Unit provided by Radio Master RC
|
||||
https://radiomasterrc.com/products/bandit-expresslrs-rf-module with 1.29" OLED display CH1115 driver
|
||||
*/
|
||||
|
||||
/*
|
||||
On this model then screen is NOT upside down, don't flip it for the user.
|
||||
*/
|
||||
#undef DISPLAY_FLIP_SCREEN
|
||||
|
||||
/*
|
||||
I2C SDA and SCL.
|
||||
0x18 - STK8XXX Accelerometer
|
||||
0x3C - SH1115 Display Driver
|
||||
*/
|
||||
#define I2C_SDA 14
|
||||
#define I2C_SCL 12
|
||||
|
||||
/*
|
||||
I2C STK8XXX Accelerometer Interrupt PIN to ESP32 Pin 6 - SENSOR_CAPP (GPIO37)
|
||||
*/
|
||||
#define STK8XXX_INT 37
|
||||
|
||||
/*
|
||||
No GPS - but free pins are available.
|
||||
*/
|
||||
#define HAS_GPS 0
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
/*
|
||||
Pin connections from ESP32-D0WDQ6 to SX1276.
|
||||
*/
|
||||
#define LORA_DIO0 22
|
||||
#define LORA_DIO1 21
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 4
|
||||
#define LORA_RESET 5
|
||||
#define LORA_TXEN 33
|
||||
|
||||
/*
|
||||
This unit has a FAN built-in.
|
||||
FAN is active at 250mW on it's ExpressLRS Firmware.
|
||||
This FAN has TACHO signal on Pin 27 for use with PWM.
|
||||
*/
|
||||
#define RF95_FAN_EN 2
|
||||
|
||||
/*
|
||||
LED PIN setup and it has a NeoPixel LED.
|
||||
It's possible to setup colors for Button 1 and 2,
|
||||
look at BUTTON1_COLOR, BUTTON1_COLOR_INDEX, BUTTON2_COLOR and BUTTON2_COLOR_INDEX
|
||||
this is done here for now.
|
||||
*/
|
||||
#define HAS_NEOPIXEL // Enable the use of neopixels
|
||||
#define NEOPIXEL_COUNT 6 // How many neopixels are connected
|
||||
#define NEOPIXEL_DATA 15 // GPIO pin used to send data to the neopixels
|
||||
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // Type of neopixels in use
|
||||
#define ENABLE_AMBIENTLIGHTING // Turn on Ambient Lighting
|
||||
// #define BUTTON1_COLOR 0xFF0000 // Background light for Button 1 in HEX RGB Color (RadioMaster Bandit only).
|
||||
// #define BUTTON1_COLOR_INDEX 0 // NeoPixel Index ID for Button 1
|
||||
// #define BUTTON2_COLOR 0x0000FF // Background light for Button 2 in HEX RGB Color (RadioMaster Bandit only).
|
||||
// #define BUTTON2_COLOR_INDEX 1 // NeoPixel Index ID for Button 2
|
||||
|
||||
/*
|
||||
It has 1 x five-way and 2 x normal buttons.
|
||||
|
||||
Button GPIO RGB Index
|
||||
---------------------------
|
||||
Five-way 39 -
|
||||
Button 1 34 0
|
||||
Button 2 35 1
|
||||
|
||||
Five way button when using ADC.
|
||||
2.632V, 2.177V, 1.598V, 1.055V, 0V
|
||||
|
||||
ADC Values:
|
||||
{ UP, DOWN, LEFT, RIGHT, ENTER, IDLE }
|
||||
3227, 0 ,1961, 2668, 1290, 4095
|
||||
|
||||
Five way button when using ADC.
|
||||
https://github.com/ExpressLRS/targets/blob/f3215b5ec891108db1a13523e4163950cfcadaac/TX/Radiomaster%20Bandit.json#L41
|
||||
|
||||
*/
|
||||
#define INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE
|
||||
#define PIN_JOYSTICK 39
|
||||
#define JOYSTICK_ADC_VALS /*UP*/ 3227, /*DOWN*/ 0, /*LEFT*/ 1961, /*RIGHT*/ 2668, /*OK*/ 1290, /*IDLE*/ 4095
|
||||
|
||||
/*
|
||||
Normal Button Pin setup.
|
||||
*/
|
||||
#define BUTTON_PIN 34
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
/*
|
||||
No External notification.
|
||||
*/
|
||||
#undef EXT_NOTIFY_OUT
|
||||
|
||||
/*
|
||||
Remapping PIN Names.
|
||||
Note, that this unit uses RFO
|
||||
*/
|
||||
#define USE_RF95
|
||||
#define USE_RF95_RFO
|
||||
#define RF95_CS LORA_CS
|
||||
#define RF95_DIO1 LORA_DIO1
|
||||
#define RF95_TXEN LORA_TXEN
|
||||
#define RF95_RESET LORA_RESET
|
||||
#define RF95_MAX_POWER 10
|
||||
|
||||
/*
|
||||
This module has Skyworks SKY66122 controlled by dacWrite
|
||||
power ranging from 100mW to 1000mW.
|
||||
|
||||
Mapping of PA_LEVEL to Power output: GPIO26/dacWrite
|
||||
168 -> 100mW
|
||||
155 -> 250mW
|
||||
142 -> 500mW
|
||||
110 -> 1000mW
|
||||
*/
|
||||
#define RF95_PA_EN 26
|
||||
#define RF95_PA_DAC_EN
|
||||
#define RF95_PA_LEVEL 110
|
||||
19
variants/esp32/radiomaster_900_bandit_micro/platformio.ini
Normal file
19
variants/esp32/radiomaster_900_bandit_micro/platformio.ini
Normal file
@@ -0,0 +1,19 @@
|
||||
;
|
||||
; This uses the same code and settings as the Radio Master Bandit Nano (https://www.radiomasterrc.com/products/bandit-nano-expresslrs-rf-module)
|
||||
;
|
||||
; Link to the unit : https://www.radiomasterrc.com/products/bandit-micro-expresslrs-rf-module
|
||||
;
|
||||
[env:radiomaster_900_bandit_micro]
|
||||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-DRADIOMASTER_900_BANDIT_NANO
|
||||
-DVTABLES_IN_FLASH=1
|
||||
-DCONFIG_DISABLE_HAL_LOCKS=1
|
||||
-O2
|
||||
-I variants/esp32/radiomaster_900_bandit_nano
|
||||
board_build.f_cpu = 240000000L
|
||||
upload_protocol = esptool
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
14
variants/esp32/radiomaster_900_bandit_nano/platformio.ini
Normal file
14
variants/esp32/radiomaster_900_bandit_nano/platformio.ini
Normal file
@@ -0,0 +1,14 @@
|
||||
[env:radiomaster_900_bandit_nano]
|
||||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-DRADIOMASTER_900_BANDIT_NANO
|
||||
-DVTABLES_IN_FLASH=1
|
||||
-DCONFIG_DISABLE_HAL_LOCKS=1
|
||||
-O2
|
||||
-I variants/esp32/radiomaster_900_bandit_nano
|
||||
board_build.f_cpu = 240000000L
|
||||
upload_protocol = esptool
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
81
variants/esp32/radiomaster_900_bandit_nano/variant.h
Normal file
81
variants/esp32/radiomaster_900_bandit_nano/variant.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Initial settings and work by https://github.com/uberhalit and re-work by https://github.com/gjelsoe
|
||||
Unit provided by Radio Master RC
|
||||
https://radiomasterrc.com/products/bandit-nano-expresslrs-rf-module with 0.96" OLED display
|
||||
*/
|
||||
|
||||
/*
|
||||
I2C SDA and SCL.
|
||||
*/
|
||||
#define I2C_SDA 14
|
||||
#define I2C_SCL 12
|
||||
|
||||
/*
|
||||
No GPS - but free solder pads are available inside the case.
|
||||
*/
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
/*
|
||||
Pin connections from ESP32-D0WDQ6 to SX1276.
|
||||
*/
|
||||
#define LORA_DIO0 22
|
||||
#define LORA_DIO1 21
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 4
|
||||
#define LORA_RESET 5
|
||||
#define LORA_TXEN 33
|
||||
|
||||
/*
|
||||
This unit has a FAN built-in.
|
||||
FAN is active at 250mW on it's ExpressLRS Firmware.
|
||||
*/
|
||||
#define RF95_FAN_EN 2
|
||||
|
||||
/*
|
||||
LED PIN setup.
|
||||
*/
|
||||
#define LED_PIN 15
|
||||
|
||||
/*
|
||||
Five way button when using ADC.
|
||||
https://github.com/ExpressLRS/targets/blob/f3215b5ec891108db1a13523e4163950cfcadaac/TX/Radiomaster%20Bandit.json#L41
|
||||
*/
|
||||
#define INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE
|
||||
#define PIN_JOYSTICK 39
|
||||
#define JOYSTICK_ADC_VALS /*UP*/ 3227, /*DOWN*/ 0, /*LEFT*/ 1961, /*RIGHT*/ 2668, /*OK*/ 1290, /*IDLE*/ 4095
|
||||
|
||||
#define DISPLAY_FLIP_SCREEN
|
||||
|
||||
/*
|
||||
No External notification.
|
||||
*/
|
||||
#undef EXT_NOTIFY_OUT
|
||||
|
||||
/*
|
||||
Remapping PIN Names.
|
||||
Note, that this unit uses RFO
|
||||
*/
|
||||
#define USE_RF95
|
||||
#define USE_RF95_RFO
|
||||
#define RF95_CS LORA_CS
|
||||
#define RF95_DIO1 LORA_DIO1
|
||||
#define RF95_TXEN LORA_TXEN
|
||||
#define RF95_RESET LORA_RESET
|
||||
#define RF95_MAX_POWER 12
|
||||
|
||||
/*
|
||||
This module has Skyworks SKY66122 controlled by dacWrite
|
||||
power rangeing from 100mW to 1000mW.
|
||||
|
||||
Mapping of PA_LEVEL to Power output: GPIO26/dacWrite
|
||||
168 -> 100mW -> 2.11v
|
||||
148 -> 250mW -> 1.87v
|
||||
128 -> 500mW -> 1.63v
|
||||
90 -> 1000mW -> 1.16v
|
||||
*/
|
||||
#define RF95_PA_EN 26
|
||||
#define RF95_PA_DAC_EN
|
||||
#define RF95_PA_LEVEL 90
|
||||
38
variants/esp32/rak11200/pins_arduino.h
Normal file
38
variants/esp32/rak11200/pins_arduino.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define LED_GREEN 12
|
||||
#define LED_BLUE 2
|
||||
|
||||
#define LED_BUILTIN LED_GREEN
|
||||
|
||||
static const uint8_t TX = 1;
|
||||
static const uint8_t RX = 3;
|
||||
|
||||
#define TX1 21
|
||||
#define RX1 19
|
||||
|
||||
#define WB_IO1 14
|
||||
#define WB_IO2 27
|
||||
#define WB_IO3 26
|
||||
#define WB_IO4 23
|
||||
#define WB_IO5 13
|
||||
#define WB_IO6 22
|
||||
#define WB_SW1 34
|
||||
#define WB_A0 36
|
||||
#define WB_A1 39
|
||||
#define WB_CS 32
|
||||
#define WB_LED1 12
|
||||
#define WB_LED2 2
|
||||
|
||||
static const uint8_t SDA = 4;
|
||||
static const uint8_t SCL = 5;
|
||||
|
||||
static const uint8_t SS = 32;
|
||||
static const uint8_t MOSI = 25;
|
||||
static const uint8_t MISO = 35;
|
||||
static const uint8_t SCK = 33;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
9
variants/esp32/rak11200/platformio.ini
Normal file
9
variants/esp32/rak11200/platformio.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[env:rak11200]
|
||||
extends = esp32_base
|
||||
board = wiscore_rak11200
|
||||
board_check = true
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D RAK_11200
|
||||
-I variants/esp32/rak11200
|
||||
upload_speed = 115200
|
||||
81
variants/esp32/rak11200/variant.h
Normal file
81
variants/esp32/rak11200/variant.h
Normal file
@@ -0,0 +1,81 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define LED_GREEN 12
|
||||
#define LED_BLUE 2
|
||||
|
||||
#define LED_BUILTIN LED_GREEN
|
||||
|
||||
static const uint8_t TX = 1;
|
||||
static const uint8_t RX = 3;
|
||||
|
||||
#define TX1 21
|
||||
#define RX1 19
|
||||
|
||||
#define WB_IO1 14
|
||||
#define WB_IO2 27
|
||||
#define WB_IO3 26
|
||||
#define WB_IO4 23
|
||||
#define WB_IO5 13
|
||||
#define WB_IO6 22
|
||||
#define WB_SW1 34
|
||||
#define WB_A0 36
|
||||
#define WB_A1 39
|
||||
#define WB_CS 32
|
||||
#define WB_LED1 12
|
||||
#define WB_LED2 2
|
||||
|
||||
static const uint8_t SDA = 4;
|
||||
static const uint8_t SCL = 5;
|
||||
|
||||
static const uint8_t SS = 32;
|
||||
static const uint8_t MOSI = 25;
|
||||
static const uint8_t MISO = 35;
|
||||
static const uint8_t SCK = 33;
|
||||
#endif /* Pins_Arduino_h */
|
||||
|
||||
/* -------- Meshtastic pins -------- */
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
#undef GPS_RX_PIN
|
||||
#define GPS_RX_PIN (RX1)
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_TX_PIN (TX1)
|
||||
|
||||
#define LED_PIN LED_BLUE
|
||||
|
||||
#define PIN_VBAT WB_A0
|
||||
#define BATTERY_PIN PIN_VBAT
|
||||
#define ADC_CHANNEL ADC1_GPIO36_CHANNEL
|
||||
|
||||
// https://docs.rakwireless.com/Product-Categories/WisBlock/RAK13300/
|
||||
|
||||
#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262/SX1268 module
|
||||
#define LORA_RESET WB_IO4 // RST for SX1276, and for SX1262/SX1268
|
||||
#define LORA_DIO1 WB_IO6 // IRQ for SX1262/SX1268
|
||||
#define LORA_DIO2 WB_IO5 // BUSY for SX1262/SX1268
|
||||
#define LORA_DIO3 \
|
||||
RADIOLIB_NC // Not connected on PCB, but internally on the TTGO SX1262/SX1268, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#undef LORA_SCK
|
||||
#define LORA_SCK SCK
|
||||
#undef LORA_MISO
|
||||
#define LORA_MISO MISO
|
||||
#undef LORA_MOSI
|
||||
#define LORA_MOSI MOSI
|
||||
#undef LORA_CS
|
||||
#define LORA_CS SS
|
||||
|
||||
#define USE_SX1262
|
||||
#define SX126X_ANT_SW WB_IO3
|
||||
#define SX126X_CS SS // NSS for SX126X
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_POWER_EN WB_IO2
|
||||
// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
10
variants/esp32/station-g1/platformio.ini
Normal file
10
variants/esp32/station-g1/platformio.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
; The 1.0 release of the nano-g1 board
|
||||
[env:station-g1]
|
||||
extends = esp32_base
|
||||
board = ttgo-t-beam
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D STATION_G1
|
||||
-I variants/esp32/station-g1
|
||||
46
variants/esp32/station-g1/variant.h
Normal file
46
variants/esp32/station-g1/variant.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
||||
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define I2C_SDA1 14 // Second i2c channel on external IO connector
|
||||
#define I2C_SCL1 15 // Second i2c channel on external IO connector
|
||||
|
||||
#define BUTTON_PIN 36 // The middle button GPIO on the Nano G1
|
||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
||||
|
||||
// common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
||||
// not found then probe for SX1262
|
||||
#define USE_RF95
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 23
|
||||
#define LORA_DIO1 33 // SX1262 IRQ
|
||||
#define LORA_DIO2 32 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH // Internally the module hooks the SX1262-DIO2 in to control the TX/RX switch
|
||||
#define SX126X_MAX_POWER \
|
||||
16 // Ensure the PA does not exceed the saturation output power. More
|
||||
// Info:https://uniteng.com/wiki/doku.php?id=meshtastic:station#rf_design_-_lora_station_edition_g1
|
||||
#endif
|
||||
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
#define BATTERY_SENSE_SAMPLES 30 // Set the number of samples, It has an effect of increasing sensitivity.
|
||||
#define ADC_MULTIPLIER 6.45
|
||||
#define CELL_TYPE_LION // same curve for liion/lipo
|
||||
#define NUM_CELLS 3
|
||||
|
||||
// different screen
|
||||
#define USE_SH1106
|
||||
|
||||
// Station may not have GPS installed, but it has a labeled GPS pinout
|
||||
#define GPS_RX_PIN 34
|
||||
#define GPS_TX_PIN 12
|
||||
15
variants/esp32/tbeam/platformio.ini
Normal file
15
variants/esp32/tbeam/platformio.ini
Normal file
@@ -0,0 +1,15 @@
|
||||
; The 1.0 release of the TBEAM board
|
||||
[env:tbeam]
|
||||
extends = esp32_base
|
||||
board = ttgo-t-beam
|
||||
board_check = true
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D TBEAM_V10
|
||||
-I variants/esp32/tbeam
|
||||
-DGPS_POWER_TOGGLE ; comment this line to disable double press function on the user button to turn off gps entirely.
|
||||
-DBOARD_HAS_PSRAM
|
||||
-mfix-esp32-psram-cache-issue
|
||||
upload_speed = 921600
|
||||
45
variants/esp32/tbeam/variant.h
Normal file
45
variants/esp32/tbeam/variant.h
Normal file
@@ -0,0 +1,45 @@
|
||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
||||
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
||||
#define BUTTON_ACTIVE_LOW true
|
||||
#define BUTTON_ACTIVE_PULLUP true
|
||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
||||
|
||||
#define LED_STATE_ON 0 // State when LED is lit
|
||||
#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4
|
||||
|
||||
// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
||||
// not found then probe for SX1262
|
||||
#define USE_RF95 // RFM95/SX127x
|
||||
#define USE_SX1262
|
||||
#define USE_SX1268
|
||||
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 23
|
||||
#define LORA_DIO1 33 // SX1262 IRQ
|
||||
#define LORA_DIO2 32 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
// Not really an E22 but TTGO seems to be trying to clone that
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
|
||||
// code)
|
||||
#endif
|
||||
|
||||
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
|
||||
// and waking from light sleep
|
||||
// #define PMU_IRQ 35
|
||||
#define HAS_AXP192
|
||||
#define GPS_UBLOX
|
||||
#define GPS_RX_PIN 34
|
||||
#define GPS_TX_PIN 12
|
||||
// #define GPS_DEBUG
|
||||
9
variants/esp32/tbeam_v07/platformio.ini
Normal file
9
variants/esp32/tbeam_v07/platformio.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
; The original TBEAM board without the AXP power chip and a few other changes
|
||||
[env:tbeam0_7]
|
||||
board_level = extra
|
||||
extends = esp32_base
|
||||
board = ttgo-t-beam
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D TBEAM_V07
|
||||
-I variants/esp32/tbeam_v07
|
||||
22
variants/esp32/tbeam_v07/variant.h
Normal file
22
variants/esp32/tbeam_v07/variant.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
||||
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define BUTTON_PIN 39
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 23
|
||||
#define LORA_DIO1 33
|
||||
#define LORA_DIO2 32 // Not really used
|
||||
|
||||
// This board has different GPS pins than all other boards
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 12
|
||||
#define GPS_TX_PIN 15
|
||||
#define GPS_UBLOX
|
||||
9
variants/esp32/tlora_v1/platformio.ini
Normal file
9
variants/esp32/tlora_v1/platformio.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[env:tlora-v1]
|
||||
board_level = extra
|
||||
extends = esp32_base
|
||||
board = ttgo-lora32-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D TLORA_V1
|
||||
-I variants/esp32/tlora_v1
|
||||
upload_speed = 115200
|
||||
17
variants/esp32/tlora_v1/variant.h
Normal file
17
variants/esp32/tlora_v1/variant.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#define I2C_SDA 4 // I2C pins for this board
|
||||
#define I2C_SCL 15
|
||||
|
||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
||||
|
||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
||||
#define VEXT_ON_VALUE LOW
|
||||
#define LED_PIN 2 // If defined we will blink this LED
|
||||
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
||||
#define BUTTON_NEED_PULLUP
|
||||
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 14
|
||||
#define LORA_DIO1 33 // Must be manually wired: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
|
||||
#define LORA_DIO2 32 // Not really used
|
||||
7
variants/esp32/tlora_v1_3/platformio.ini
Normal file
7
variants/esp32/tlora_v1_3/platformio.ini
Normal file
@@ -0,0 +1,7 @@
|
||||
[env:tlora_v1_3]
|
||||
board_level = extra
|
||||
extends = esp32_base
|
||||
board = ttgo-lora32-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags} -D TLORA_V1_3 -I variants/esp32/tlora_v1_3
|
||||
upload_speed = 115200
|
||||
18
variants/esp32/tlora_v1_3/variant.h
Normal file
18
variants/esp32/tlora_v1_3/variant.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
|
||||
#define I2C_SDA 21 // I2C pins for this board
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
|
||||
|
||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
||||
#define LED_PIN 25 // If defined we will blink this LED
|
||||
#define BUTTON_PIN 36
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 14
|
||||
#define LORA_DIO1 33 // Prob. must be manually wired: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
|
||||
#define LORA_DIO2 32 // Not really used
|
||||
8
variants/esp32/tlora_v2/platformio.ini
Normal file
8
variants/esp32/tlora_v2/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
||||
[env:tlora-v2]
|
||||
board_level = extra
|
||||
extends = esp32_base
|
||||
board = ttgo-lora32-v1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D TLORA_V2
|
||||
-I variants/esp32/tlora_v2
|
||||
18
variants/esp32/tlora_v2/variant.h
Normal file
18
variants/esp32/tlora_v2/variant.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
|
||||
#define I2C_SDA 21 // I2C pins for this board
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
|
||||
#define LED_PIN 25 // If defined we will blink this LED
|
||||
#define BUTTON_PIN \
|
||||
0 // If defined, this will be used for user button presses, if your board doesn't have a physical switch, you can wire one
|
||||
// between this pin and ground
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 14
|
||||
#define LORA_DIO1 33 // Must be manually wired: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
|
||||
#define LORA_DIO2 32 // Not really used
|
||||
8
variants/esp32/tlora_v2_1_16/platformio.ini
Normal file
8
variants/esp32/tlora_v2_1_16/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
||||
[env:tlora-v2-1-1_6]
|
||||
extends = esp32_base
|
||||
board = ttgo-lora32-v21
|
||||
board_check = true
|
||||
build_flags =
|
||||
${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/esp32/tlora_v2_1_16
|
||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
upload_speed = 115200
|
||||
25
variants/esp32/tlora_v2_1_16/variant.h
Normal file
25
variants/esp32/tlora_v2_1_16/variant.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#define BATTERY_PIN 35
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
#define BATTERY_SENSE_SAMPLES 30
|
||||
|
||||
// ratio of voltage divider = 2.0 (R42=100k, R43=100k)
|
||||
#define ADC_MULTIPLIER 2
|
||||
|
||||
#define I2C_SDA 21 // I2C pins for this board
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define LED_PIN 25 // If defined we will blink this LED
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 23
|
||||
|
||||
// In the T3 V1.6.1 TXCO version, GPIO 33 is connected to Radio’s
|
||||
// internal temperature-compensated crystal oscillator enable
|
||||
#ifdef LORA_TCXO_GPIO
|
||||
#define LORA_DIO1 RADIOLIB_NC // no-connect on sx127x module
|
||||
#else
|
||||
#define LORA_DIO1 33 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
|
||||
#endif
|
||||
|
||||
#define LORA_DIO2 32 // Not really used
|
||||
11
variants/esp32/tlora_v2_1_16_tcxo/platformio.ini
Normal file
11
variants/esp32/tlora_v2_1_16_tcxo/platformio.ini
Normal file
@@ -0,0 +1,11 @@
|
||||
[env:tlora-v2-1-1_6-tcxo]
|
||||
extends = esp32_base
|
||||
board_level = extra
|
||||
board = ttgo-lora32-v21
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D TLORA_V2_1_16
|
||||
-I variants/esp32/tlora_v2_1_16
|
||||
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
-D LORA_TCXO_GPIO=33
|
||||
upload_speed = 115200
|
||||
9
variants/esp32/tlora_v2_1_18/platformio.ini
Normal file
9
variants/esp32/tlora_v2_1_18/platformio.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[env:tlora-v2-1-1_8]
|
||||
extends = esp32_base
|
||||
board_level = extra
|
||||
board = ttgo-lora32-v21
|
||||
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D TLORA_V2_1_18
|
||||
-I variants/esp32/tlora_v2_1_18
|
||||
20
variants/esp32/tlora_v2_1_18/variant.h
Normal file
20
variants/esp32/tlora_v2_1_18/variant.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
// ratio of voltage divider = 2.0 (R42=100k, R43=100k)
|
||||
#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
|
||||
#define I2C_SDA 21 // I2C pins for this board
|
||||
#define I2C_SCL 22
|
||||
|
||||
#define LED_PIN 25 // If defined we will blink this LED
|
||||
#define BUTTON_PIN 12 // If defined, this will be used for user button presses,
|
||||
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#define USE_SX1280
|
||||
#define LORA_RESET 23
|
||||
|
||||
#define SX128X_CS 18
|
||||
#define SX128X_DIO1 26
|
||||
#define SX128X_BUSY 32
|
||||
#define SX128X_RESET LORA_RESET
|
||||
10
variants/esp32/tlora_v3_3_0_tcxo/platformio.ini
Normal file
10
variants/esp32/tlora_v3_3_0_tcxo/platformio.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
[env:tlora-v3-3-0-tcxo]
|
||||
extends = esp32_base
|
||||
board = ttgo-lora32-v21
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D TLORA_V2_1_16
|
||||
-I variants/esp32/tlora_v2_1_16
|
||||
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
-D LORA_TCXO_GPIO=12
|
||||
-D BUTTON_PIN=0
|
||||
8
variants/esp32/trackerd/platformio.ini
Normal file
8
variants/esp32/trackerd/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
||||
[env:trackerd]
|
||||
extends = esp32_base
|
||||
board = pico32
|
||||
board_build.f_flash = 80000000L
|
||||
|
||||
build_flags =
|
||||
${esp32_base.build_flags} -D PRIVATE_HW -I variants/esp32/trackerd -D BSFILE=\"boards/dragino_lbt2.h\"
|
||||
;board_build.partitions = no_ota.csv
|
||||
53
variants/esp32/trackerd/variant.h
Normal file
53
variants/esp32/trackerd/variant.h
Normal file
@@ -0,0 +1,53 @@
|
||||
// Initialize i2c bus on sd_dat and esp_led pins, respectively. We need a bus to not hang on boot
|
||||
#define HAS_SCREEN 0
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 9
|
||||
#define GPS_TX_PIN 10
|
||||
|
||||
#define LED_PIN 13 // 13 red, 2 blue, 15 red
|
||||
|
||||
// #define HAS_BUTTON 0
|
||||
#define BUTTON_PIN 0
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 26 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 23
|
||||
#define LORA_DIO1 33
|
||||
#define LORA_DIO2 32 // Not really used
|
||||
|
||||
#undef BAT_MEASURE_ADC_UNIT
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_MULTIPLIER 1.34 // tracked resistance divider is 100k+470k, so it can not fillfull well on esp32 adc
|
||||
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_12 // lower dB for high resistance voltage divider
|
||||
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#undef PIN_GPS_PPS
|
||||
|
||||
#define PIN_GPS_EN 12
|
||||
#define GPS_EN_ACTIVE 1
|
||||
|
||||
#define GPS_TX_PIN 10
|
||||
#define GPS_RX_PIN 9
|
||||
|
||||
#define PIN_GPS_RESET 25
|
||||
// #define PIN_GPS_REINIT 25
|
||||
#define GPS_RESET_MODE 1
|
||||
|
||||
#define GPS_L76K
|
||||
|
||||
#undef PIN_LED1
|
||||
#undef PIN_LED2
|
||||
#undef PIN_LED3
|
||||
|
||||
#define PIN_LED1 13
|
||||
#define PIN_LED2 15
|
||||
#define PIN_LED3 2
|
||||
|
||||
#define ledOff(pin) pinMode(pin, INPUT)
|
||||
44
variants/esp32/wiphone/pins_arduino.h
Normal file
44
variants/esp32/wiphone/pins_arduino.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t TX = 1;
|
||||
static const uint8_t RX = 3;
|
||||
|
||||
static const uint8_t SDA = 21;
|
||||
static const uint8_t SCL = 22;
|
||||
|
||||
static const uint8_t SS = 5;
|
||||
static const uint8_t MOSI = 23;
|
||||
static const uint8_t MISO = 19;
|
||||
static const uint8_t SCK = 18;
|
||||
|
||||
static const uint8_t G23 = 23;
|
||||
static const uint8_t G19 = 19;
|
||||
static const uint8_t G18 = 18;
|
||||
static const uint8_t G3 = 3;
|
||||
static const uint8_t G16 = 16;
|
||||
static const uint8_t G21 = 21;
|
||||
static const uint8_t G2 = 2;
|
||||
static const uint8_t G12 = 12;
|
||||
static const uint8_t G15 = 15;
|
||||
static const uint8_t G35 = 35;
|
||||
static const uint8_t G36 = 36;
|
||||
static const uint8_t G25 = 25;
|
||||
static const uint8_t G26 = 26;
|
||||
static const uint8_t G1 = 1;
|
||||
static const uint8_t G17 = 17;
|
||||
static const uint8_t G22 = 22;
|
||||
static const uint8_t G5 = 5;
|
||||
static const uint8_t G13 = 13;
|
||||
static const uint8_t G0 = 0;
|
||||
static const uint8_t G34 = 34;
|
||||
|
||||
static const uint8_t DAC1 = 25;
|
||||
static const uint8_t DAC2 = 26;
|
||||
|
||||
static const uint8_t ADC1 = 35;
|
||||
static const uint8_t ADC2 = 36;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
15
variants/esp32/wiphone/platformio.ini
Normal file
15
variants/esp32/wiphone/platformio.ini
Normal file
@@ -0,0 +1,15 @@
|
||||
[env:wiphone]
|
||||
extends = esp32_base
|
||||
board = wiphone
|
||||
board_level = extra
|
||||
monitor_filters = esp32_exception_decoder
|
||||
board_build.partitions = default_16MB.csv
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D WIPHONE
|
||||
-I variants/esp32/wiphone
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
lovyan03/LovyanGFX@^1.2.0
|
||||
sparkfun/SX1509 IO Expander@^3.0.5
|
||||
pololu/APA102@^3.0.0
|
||||
62
variants/esp32/wiphone/variant.h
Normal file
62
variants/esp32/wiphone/variant.h
Normal file
@@ -0,0 +1,62 @@
|
||||
#define I2C_SDA 15
|
||||
#define I2C_SCL 25
|
||||
|
||||
#define GPIO_EXTENDER 1509
|
||||
#define EXTENDER_FLAG 0x40
|
||||
#define EXTENDER_PIN(x) (x + EXTENDER_FLAG)
|
||||
|
||||
#undef RF95_SCK
|
||||
#undef RF95_MISO
|
||||
#undef RF95_MOSI
|
||||
#undef RF95_NSS
|
||||
|
||||
#define RF95_SCK 14
|
||||
#define RF95_MISO 12
|
||||
#define RF95_MOSI 13
|
||||
#define RF95_NSS 27
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 38
|
||||
#define LORA_RESET RADIOLIB_NC
|
||||
#define LORA_DIO1 RADIOLIB_NC
|
||||
#define LORA_DIO2 RADIOLIB_NC
|
||||
|
||||
// This board has no GPS or Screen for now
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define NO_GPS 1
|
||||
#define HAS_GPS 0
|
||||
#define NO_SCREEN
|
||||
#define HAS_SCREEN 0
|
||||
|
||||
// Default SPI1 will be mapped to the display
|
||||
#define ST7789_SDA 23
|
||||
#define ST7789_SCK 18
|
||||
#define ST7789_CS 5
|
||||
#define ST7789_RS 26
|
||||
// I don't have a 'wiphone' but this I think should not be defined this way (don't set TFT_BL if we don't have a hw way to control
|
||||
// it)
|
||||
// #define ST7789_BL -1 // EXTENDER_PIN(9)
|
||||
|
||||
#define ST7789_RESET -1
|
||||
#define ST7789_MISO 19
|
||||
#define ST7789_BUSY -1
|
||||
#define ST7789_SPI_HOST SPI3_HOST
|
||||
// I don't have a 'wiphone' but this I think should not be defined this way (don't set TFT_BL if we don't have a hw way to control
|
||||
// it)
|
||||
// #define TFT_BL -1 // EXTENDER_PIN(9)
|
||||
#define SPI_FREQUENCY 40000000
|
||||
#define SPI_READ_FREQUENCY 16000000
|
||||
#define TFT_HEIGHT 240
|
||||
#define TFT_WIDTH 320
|
||||
#define TFT_OFFSET_X 0
|
||||
#define TFT_OFFSET_Y 0
|
||||
#define TFT_OFFSET_ROTATION 0
|
||||
#define SCREEN_ROTATE
|
||||
#define SCREEN_TRANSITION_FRAMERATE 5
|
||||
|
||||
#define I2S_MCLK_GPIO0
|
||||
#define I2S_BCK_PIN 4 // rev1.3 - 4 (wp05)
|
||||
#define I2S_WS_PIN 33
|
||||
#define I2S_MOSI_PIN 21
|
||||
#define I2S_MISO_PIN 34
|
||||
Reference in New Issue
Block a user