Skip to content
wavemoranPublic

About

Open-source firmware for ESP32-C3 round-screen life counters (compatible with the MetalFab Tokens Life Puck)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

OpenPuck

CI OpenSSF Scorecard

OpenPuck

OpenPuck is free, open-source software for your Life Puck, the round-screen counter used for card games. It gives you a fast, easy-to-read life counter for one or two players, with a game timer, a history of changes, your choice of colors and a battery indicator. It is built to be reliable first: the screen answers your touch right away, your game is saved in the background, and the puck turns off only when you tell it to or when it has been left alone.

OpenPuck is an independent project. It is not affiliated with or endorsed by MetalFab Tokens. "Life Puck" is used only to describe compatible hardware.

One player Two players Menu Colors
One player counter showing 20 with the timer below Two player counter, red and blue halves, player 2 upside down Menu with New game, Timer, History and Settings Colors ring with ten color swatches around a preview

What it does

  • Count life for one or two players. Tap to add or subtract 1, hold to change by 5. Numbers stay between 0 and 99.
  • Two players share the screen, each half facing its player.
  • Running change shows how much you gained or lost in a burst of taps.
  • Timer counts down, then into red overtime. Start and pause it with the power button.
  • History lists every change since the game began.
  • Colors: presets (Blue, Green, Red, Yellow and more) or your own, for each player.
  • Battery indicator, adjustable brightness, and auto-off.
  • Remembers your game and settings when you turn it off.

Get started

  1. Install from your browser: back up your puck, then install OpenPuck, with nothing to set up. The install guide has the steps, supported browsers and a command-line alternative.
  2. User guide: how every screen and setting works.
  3. Stuck? See troubleshooting and SUPPORT.md.

Compatibility

OpenPuck is made for the MetalFab Tokens Life Puck. It is built on its parts: an ESP32-C3 processor, a GC9A01 round 240x240 screen and a CST816S touch controller. Other devices that use the same parts may be supported later.

Before you install

Back up your puck first. The backup is the only way to go back to the software it came with, and the install tool will not run without one. Installing is at your own risk. See the install guide.

For developers

OpenPuck is written in C on ESP-IDF v6.1 with LVGL 9.6. The game logic is in components/puck_core (no hardware, unit-tested); main/ is the thin hardware and screen layer.

Part Detail
Processor ESP32-C3 (RISC-V, Wi-Fi + BLE), 4 MB flash
Display GC9A01 240x240 round LCD, SPI
Touch CST816S, I2C
Power Battery, with a GPIO-held power latch and a power button

Quick start:

source ~/.espressif/tools/activate_idf_v6.1.sh   # path depends on your install
idf.py set-target esp32c3   # first time only
idf.py build                # release profile
tools/test.sh               # host unit tests with a 90% coverage gate
tools/screenshots.sh        # regenerate docs/images/*.png

The same parts (ESP32-C3, GC9A01 and CST816S) are used on several off-the-shelf round display boards, so a board-config layer is planned so those can run OpenPuck too. Exact component versions are pinned in dependencies.lock.

Credits

License

OpenPuck is licensed under the Apache License 2.0.

About

Open-source firmware for ESP32-C3 round-screen life counters (compatible with the MetalFab Tokens Life Puck)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages