This project demonstrates using LuaVGL on the LilyGo T-Deck device. LuaVGL is a Lua binding for LVGL that allows you to create GUIs with Lua scripts.
- Combines the power of LVGL with the simplicity of Lua scripting
- Runs on the LilyGo T-Deck
- Demonstrates touch and display capabilities
- Uses PlatformIO for easy building
- Loads Lua scripts from the filesystem
- Integrates MeshCore networking
/src- Main C++ codemain.cpp- Main application code
/data- Data files that get uploaded to the device filesystem/lua- Lua scripts/apps- Lua apps
- PlatformIO
- T-Deck device
- Git (for submodules)
softwareupdate --install-rosetta- Clone this repository
- Initialize the submodules:
git submodule update --init --recursive - Open in PlatformIO
- Edit Lua scripts in the
/data/luadirectory - Build and upload to your T-Deck device:
This will upload only the firmware, not the filesystem data.
pio run --target upload - To upload the filesystem data (when changing lua scripts)
pio run --target uploadfs
You must close the serial monitor before uploadfs or it wont work.
The example loads the launcher.lua script from the filesystem and displays a simple launcher UI. You can edit the Lua scripts in your IDE with proper syntax highlighting and then upload just the filesystem to quickly iterate on your UI design.
- Edit the Lua scripts in
/data/lua - Upload the filesystem with
pio run --target uploadfs - The device will automatically load the updated scripts
You can create additional Lua scripts in the /data/lua directory. Scripts can be loaded from other scripts using require:
local utils = require('utils')You should add your apps to apps.toml to have them appear in the launcher.
Pull requests are welcome! Please keep in mind the following rules:
- should be minimal (only touch required files, minimal changes)
- respect the current code style and indentation
- be the most obvious code that will run performantly
- keep your code idiomatic unless theres a good reason not to
The goal is to make this project easy for new developers to pick up and contribute to.
MIT
- LuaVGL by XuNeo: https://github.com/XuNeo/luavgl
- LVGL: https://lvgl.io/
- LilyGo for the T-Deck hardware