Skip to content

Commit 012064a

Browse files
berlincountfifieldt
authored andcommitted
improve support for Heltec Wireless Bridge
1 parent c9d411c commit 012064a

File tree

3 files changed

+52
-23
lines changed

3 files changed

+52
-23
lines changed

src/sleep.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false, bool skipSaveN
332332
}
333333
#endif
334334

335-
#if defined(ARCH_ESP32) && defined(I2C_SDA)
335+
#if !MESHTASTIC_EXCLUDE_I2C && defined(ARCH_ESP32) && defined(I2C_SDA)
336336
// Added by https://github.com/meshtastic/firmware/pull/4418
337337
// Possibly to support Heltec Capsule Sensor?
338338
Wire.end();
@@ -542,4 +542,4 @@ void enableLoraInterrupt()
542542
}
543543
#endif
544544
}
545-
#endif
545+
#endif

variants/heltec_wireless_bridge/platformio.ini

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,21 @@
33
extends = esp32_base
44
board = heltec_wifi_lora_32
55
build_flags =
6-
${esp32_base.build_flags} -D HELTEC_WIRELESS_BRIDGE -I variants/heltec_wireless_bridge
6+
${esp32_base.build_flags}
7+
-I variants/heltec_wireless_bridge
8+
-D HELTEC_WIRELESS_BRIDGE
9+
-D BOARD_HAS_PSRAM
10+
-D RADIOLIB_EXCLUDE_LR11X0=1
11+
-D RADIOLIB_EXCLUDE_SX128X=1
12+
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
13+
-D MESHTASTIC_EXCLUDE_DETECTIONSENSOR=1
14+
-D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
15+
-D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL=1
16+
-D MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION=1
17+
-D MESHTASTIC_EXCLUDE_GPS=1
18+
-D MESHTASTIC_EXCLUDE_I2C=1
19+
-D MESHTASTIC_EXCLUDE_INPUTBROKER=1
20+
-D MESHTASTIC_EXCLUDE_POWER_FSM=1
21+
-D MESHTASTIC_EXCLUDE_SERIAL=1
22+
-D MESHTASTIC_EXCLUDE_SCREEN=1
23+
-D MESHTASTIC_EXCLUDE_WAYPOINT=1
Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
1-
// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine.
2-
// Tested on Neo6m module.
1+
2+
// updated variant 20250420 berlincount, tested with HTIT-TB
3+
//
4+
// connections in HTIT-WB
5+
// per https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
6+
// md5: a0e6ae10ff76611aa61433366b2e4f5c esp32_datasheet_en.pdf
7+
// per https://resource.heltec.cn/download/Wireless_Bridge/Schematic_Diagram_HTIT-WB_V0.2.pdf
8+
// md5: d5c1b0219ece347dd8cee866d7d3ab0a Schematic_Diagram_HTIT-WB_V0.2.pdf
9+
10+
#define NO_EXT_GPIO 1
11+
#define NO_GPS 1
12+
13+
#define HAS_GPS 0 // GPS is not equipped
314
#undef GPS_RX_PIN
415
#undef GPS_TX_PIN
5-
#define GPS_RX_PIN 36
6-
#define GPS_TX_PIN 33
7-
8-
#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag
9-
#define I2C_SDA 4 // I2C pins for this board
10-
#define I2C_SCL 15
11-
#endif
1216

13-
#define LED_PIN 25 // If defined we will blink this LED
14-
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
17+
// Green / Lora = PIN 22 / GPIO2, Yellow / Wifi = PIN 23 / GPIO0, Blue / BLE = PIN 25 / GPIO16
18+
#define LED_PIN 22
19+
#define WIFI_LED 23
20+
#define BLE_LED 25
1521

22+
// ESP32-D0WDQ6 direct pins SX1276
1623
#define USE_RF95
17-
#define LORA_DIO0 26 // a No connect on the SX1262 module
24+
#define LORA_DIO0 26
25+
#define LORA_DIO1 35
26+
#define LORA_DIO2 34
27+
#define LORA_SCK 05
28+
#define LORA_MISO 19
29+
#define LORA_MOSI 27
30+
#define LORA_CS 18
31+
32+
// several things are not possible with JTAG enabled
1833
#ifndef USE_JTAG
19-
#define LORA_RESET 14
34+
#define LORA_RESET 14 // LoRa Reset shares a pin with MTMS
35+
#define I2C_SDA 4 // SD_DATA1 going to W25Q64, but
36+
#define I2C_SCL 15 // SD_CMD shared a pin with MTD0
2037
#endif
21-
#define LORA_DIO1 35
22-
#define LORA_DIO2 34 // Not really used
2338

24-
// ratio of voltage divider = 3.20 (R1=100k, R2=220k)
25-
#define ADC_MULTIPLIER 3.2
39+
// user button is present on device, but currently untested & unconfigured - couldn't figure out how it's connected
2640

27-
#define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
28-
#define ADC_CHANNEL ADC2_GPIO13_CHANNEL
29-
#define BAT_MEASURE_ADC_UNIT 2
41+
// battery support is present within device, but currently untested & unconfigured - couldn't find reliable information yet

0 commit comments

Comments
 (0)