Skip to content

Commit 92a8be6

Browse files
committed
Added support for SugarCube device
1 parent c48a64e commit 92a8be6

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[env:sugarcube]
2+
extends = esp32_base
3+
board = ttgo-lora32-v21
4+
board_check = true
5+
build_flags =
6+
${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/esp32/sugarcube
7+
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
8+
upload_speed = 115200

variants/esp32/sugarcube/variant.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#define BATTERY_PIN 35
2+
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
3+
#define BATTERY_SENSE_SAMPLES 30
4+
5+
// ratio of voltage divider = 2.0 (R42=100k, R43=100k)
6+
#define ADC_MULTIPLIER 2
7+
8+
#define I2C_SDA 21 // I2C pins for this board
9+
#define I2C_SCL 22
10+
11+
#define BUTTON_PIN 0
12+
//#define LED_PIN 25 // If defined we will blink this LED
13+
14+
#define USE_RF95
15+
#define LORA_DIO0 26 // a No connect on the SX1262 module
16+
#define LORA_RESET 23
17+
18+
// In the T3 V1.6.1 TXCO version, GPIO 33 is connected to Radio’s
19+
// internal temperature-compensated crystal oscillator enable
20+
#ifdef LORA_TCXO_GPIO
21+
#define LORA_DIO1 RADIOLIB_NC // no-connect on sx127x module
22+
#else
23+
#define LORA_DIO1 33 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
24+
#endif
25+
26+
#define LORA_DIO2 32 // Not really used

0 commit comments

Comments
 (0)