Commit Graph

10 Commits

Author SHA1 Message Date
Adolfo Reyna
fe5d58b663 Refactor power saving logic into display drivers and add ST7789 support 2026-02-10 22:20:53 -05:00
Adolfo Reyna
8cbb95b181 Add auto-sleep/wake functionality with timer-based dimming
- Added PWM brightness control to ST7796 driver (0-100%)
- Implemented hardware sleep mode for ST7796 (saves ~150mA)
- Added sleep/wake functions preserving framebuffer and settings
- Implemented timer-based inactivity detection (checks every 10s)
- Auto-sleep after 5 minutes of no user input
- Touch controller remains active during TFT sleep for instant wake
- E-ink display also sleeps after timeout, requires re-init on wake
- Added hardware_pwm library dependency to CMakeLists.txt
- Brightness and sleep/wake methods exposed through display abstraction layer
2026-02-10 20:29:10 -05:00
Adolfo Reyna
e6e4eca188 Add Lua 5.4 scripting integration for dynamic game loading
- Integrated Lua 5.4 engine (32-bit mode for embedded ARM)
- Created LuaGame wrapper class implementing Game interface
- Added C++ bindings exposing renderer, game state, and input to Lua
- Implemented SD card loader for automatic .lua game discovery
- Updated GameLauncher to support std::function for lambda captures
- Made Game class members public for Lua bindings access
- Added example Lua games: counter, snake, bouncing ball
- Included comprehensive API documentation

Games can now be written as .lua text files on SD card and loaded
without recompilation. Build size: 747KB UF2, Lua VM uses ~50-80KB RAM.
2026-02-07 11:56:03 -05:00
Adolfo Reyna
cad1aad2c8 initial monopoly test 2026-01-31 09:45:40 -05:00
Adolfo Reyna
e3445b545d Initial game launcher 2026-01-30 21:39:09 -05:00
Adolfo Reyna
2a6861fdf5 refactored to multiple games implementation 2026-01-30 21:33:42 -05:00
Adolfo Reyna
435a5caa56 tic tac toe works on touch and eink 2026-01-29 17:16:59 -05:00
Adolfo Reyna
8d0bca691a hardware button support 2026-01-29 15:23:03 -05:00
Adolfo Reyna
adfbef7228 abstracting display, touch and sd 2026-01-28 20:12:41 -05:00
Adolfo Reyna
57426c6e7d touch & sd working 2026-01-28 17:22:15 -05:00