- There's a guide for developing animations in creating animations.
- Development standards and best practices documented in Coding Guidelines.
- The project has Python utilities for generating LED coordinates and visualizing the 3D model. For info about using them , please refer to the Utilities README.
We're using PlatformIO to build the firmware and manage dependencies. Just clone the repo and open the project in VSCode/Cursor/whatever.
If for some reason you need to change the orientation settings of the PCB, you will need to change the side_rotation
array in util/dodeca_core.py
and re-run the Python utilities to generate the new LED coordinates, and update the points.h
file.
To configure the animation settings, look at the bottom of the setup()
function in src/main.cpp
, there you will find how to disable the slideshow mode, or change the order of animations. Currently, the pushbutton is configured to advance to the next animation in the list.
If you just want to make animations, you can skip the Python environment setup.
- Install Required Tools
# Install Python 3.12 and direnv
brew install [email protected] direnv tcl-tk
- Configure direnv
Add this to your ~/.zshrc
or ~/.bashrc
:
# Add direnv hook
eval "$(direnv hook zsh)" # or bash if you use bash
Restart your terminal or run: source ~/.zshrc
- Project Setup
In your project root directory:
# Copy example configuration files
cp .env.example .env
cp .envrc.example .envrc
# Create and activate virtual environment
/opt/homebrew/opt/[email protected]/bin/python3.12 -m venv venv
source venv/bin/activate
# Allow direnv for this directory
direnv allow .
# Install requirements
pip install -r util/requirements.txt
Now whenever you cd into the project directory:
- The correct Python version (3.12) will be activated
- The virtual environment will be activated automatically
- PYTHONPATH will be set correctly
To verify your setup:
python --version # Should show Python 3.12.x
echo $PYTHONPATH # Should show your project root
pip list # Should show installed packages
If you see Python version mismatches when opening a new terminal:
- Ensure direnv is properly hooked into your shell
- Check that
.envrc
and.env
are in the project root - Run
direnv allow .
in the project directory - Verify with
which python
that it points to your venv
If Tkinter issues occur:
# Test Tkinter
python -c "import tkinter; tkinter._test()"
# If needed, reinstall Python with Tk support
brew unlink python-tk
brew uninstall [email protected]
brew install [email protected] --with-tcl-tk