Add LINK32 (Lilygo) Board with Light+Environment sensors

TODO: replace PRIVATE_HW with actual HWID
This commit is contained in:
Thomas Göttgens 2025-05-27 18:43:51 +02:00
parent 158c88ddef
commit 39eb43367a
3 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define USB_VID 0x303a
#define USB_PID 0x1001
// The default Wire will be mapped to PMU and RTC
static const uint8_t SDA = 47;
static const uint8_t SCL = 48;
// Default SPI will be mapped to Radio
static const uint8_t SS = 21;
static const uint8_t MOSI = 34;
static const uint8_t MISO = 33;
static const uint8_t SCK = 16;
#endif /* Pins_Arduino_h */

View File

@ -0,0 +1,12 @@
[env:link32-s3-v1]
extends = esp32s3_base
board = esp32-s3-devkitc-1
build_flags =
${esp32_base.build_flags} -D PRIVATE_HW -I variants/link32_s3_v1
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
-DARDUINO_USB_CDC_ON_BOOT
-DARDUINO_USB_MODE=1
-DRADIOLIB_EXCLUDE_SX128X=1
-DRADIOLIB_EXCLUDE_SX127X=1
-DRADIOLIB_EXCLUDE_LR11X0=1

View File

@ -0,0 +1,42 @@
#define BATTERY_PIN 15
#define ADC_CHANNEL ADC2_GPIO15_CHANNEL // ADC channel for battery voltage measurement
#define BATTERY_SENSE_SAMPLES 30
#define BAT_MEASURE_ADC_UNIT 2 // Use ADC2 for battery measurement
#define USE_SSD1306
#define BUTTON_PIN 0 // Button pin for this board
#define BUTTON_PIN_ALT 36
#define HAS_NEOPIXEL // If defined, we will use the neopixel library
#define NEOPIXEL_DATA 35 // Neopixel pin for this board
#define NEOPIXEL_COUNT 1 // Number of neopixels on this board
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
#define ADC_MULTIPLIER 2
#define I2C_SDA 47 // I2C pins for this board
#define I2C_SCL 48
#define USE_SX1262
#define LORA_SCK 16
#define LORA_MISO 33
#define LORA_MOSI 34
#define LORA_CS 21
#define LORA_RESET 18
#define LORA_DIO0 12 // a No connect on the SX1262 module
#define LORA_DIO1 13
#define LORA_DIO2 14 // Not really used
#define LORA_TCXO_GPIO 17
#define TCXO_OPTIONAL
#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