Skip to content

Commit ef9d997

Browse files
authored
Merge pull request #6 from fhessel/feature/board-t-beam
Add support for LILYGO T-Beam
2 parents 2e13e83 + 42d037e commit ef9d997

File tree

6 files changed

+53
-4
lines changed

6 files changed

+53
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ Currently supported hardware:
240240
* Raspberry Pi with [Dragino LoRa GPS HAT](https://wiki.dragino.com/index.php?title=Lora/GPS_HAT)
241241
* [Pycom LoPy 4](https://pycom.io/product/lopy4/) with external USB-to-Serial converter ([Documentation](docs/board_lopy4.md))
242242
* [Adafruit Feather M0 LoRa](https://www.adafruit.com/product/3178)
243+
* [LILYGO T-Beam](https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series), v1.1
243244

244245
## Development
245246

chirpotle.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,21 @@ function chirpotle_deploy {
339339
fi
340340
fi
341341

342+
# Build T-Beam (UART mode)
343+
if [[ "$USED_FIRMWARES" =~ " t-beam-uart " ]] || [[ $BUILD_ALL == 1 ]]; then
344+
PRECONF=t-beam-uart make -C "$APPDIR" clean all preflash
345+
if [[ "$?" != "0" ]]; then
346+
echo "Building the companion application failed for (T-Beam, uart)." >&2
347+
exit 1
348+
fi
349+
(mkdir -p "$APPDIR/dist/t-beam-uart" && cp "$REPODIR/submodules/RIOT/cpu/esp32/bin/bootloader.bin" \
350+
"$APPDIR/bin/esp32-wroom-32/partitions.csv" "$APPDIR/bin/esp32-wroom-32"/*.bin "$APPDIR/dist/t-beam-uart/")
351+
if [[ "$?" != "0" ]]; then
352+
echo "Creating distribution of companion application failed for (T-Beam, uart)." >&2
353+
exit 1
354+
fi
355+
fi
356+
342357
# Build Feather M0 (UART mode)
343358
if [[ "$USED_FIRMWARES" =~ " lora-feather-m0 " ]] || [[ $BUILD_ALL == 1 ]]; then
344359
PRECONF=lora-feather-m0 make -C "$APPDIR" clean all

node/companion-app/riot-apps/chirpotle-companion/Makefile.preconf

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,38 @@ ifeq ($(PRECONF),lopy4-uart)
240240
endif
241241

242242
# ------------------------------------------------------------------------------
243-
# esp32-generic: Generic ESP32 board manually wired to a transceiver
243+
# t-beam: TTGO/LILYGO T-Beam ESP32 board manually wired to a transceiver
244+
# ------------------------------------------------------------------------------
245+
# The TTGO/LILYGO T-Beam is an ESP32-based board with GPS and LoRa module on it.
246+
# The following configuration is based on the LILYGO variant, Rev 1.1:
247+
# - https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/blob/master/assets/image/t-beam_v1.1_pinmap.jpg
248+
# - https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/blob/master/schematic/LilyGo_TBeam_V1.1.pdf
249+
#
250+
# Sadly, DIO3 is not connected on these boards.
251+
ifeq ($(PRECONF),t-beam-uart)
252+
# Use the generic wroom-32 board as basis
253+
BOARD = esp32-wroom-32
254+
255+
# For simplicity: Same SPI pins as for the ESP32
256+
LORA_SPI_BUS ?= "SPI_DEV(0)"
257+
CFLAGS += -DSPI0_SCK=GPIO5
258+
CFLAGS += -DSPI0_MISO=GPIO19
259+
CFLAGS += -DSPI0_MOSI=GPIO27
260+
LORA_SPI_CS ?= GPIO18
261+
LORA_GPIO_RESET ?= GPIO23
262+
263+
LORA_GPIO_DIO0 ?= GPIO26
264+
265+
# Jam on button press
266+
LORA_GPIO_JAMMER ?= GPIO38
267+
268+
# We use the TCP interface over WiFi
269+
INTERFACE ?= uart
270+
271+
endif
272+
273+
# ------------------------------------------------------------------------------
274+
# esp32-generic: Generic ESP32 board with LoRa and GPS, v1.1
244275
# ------------------------------------------------------------------------------
245276
# Setup is very similar to the LoPy, but you can use any ESP32 DevBoard and
246277
# connect a LoRa Transceiver to it, like the [Dragino LoRa Bee](https://wiki.dragino.com/index.php?title=Lora_BEE)

node/remote-modules/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
py_ubjson==0.13.0
22
pyserial==3.4
3-
esptool==2.8
3+
esptool==3.0

scripts/conf-editor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,9 @@ def prompt_conntype():
366366
"None".
367367
''')
368368
firmwares = {
369-
"LoPy 4 via UART": "lopy4-uart",
370-
"LoRa Feather M0": "lora-feather-m0",
369+
"Pycom LoPy 4 via UART": "lopy4-uart",
370+
"Adafruit LoRa Feather M0": "lora-feather-m0",
371+
"LILYGO T-Beam v1.1 via UART": "t-beam-uart",
371372
}
372373
firmware = Bullet(
373374
prompt="Which firmware should be flashed to the MCU?",

scripts/list-used-firmwares.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def conf_path_to_obj(d):
5050
"lora-feather-m0": "arm_none",
5151
"lopy4-uart": "esp32",
5252
"lopy4": "esp32",
53+
"t-beam-uart": "esp32",
5354
"native-raspi": "arm_linux",
5455
}
5556
used_platforms = set()

0 commit comments

Comments
 (0)