Software for cycling through and displaying the best LED effects and animations on the Raspberry Pi Pico with the Pimoroni Unicorn Pack. Switch between views easily by pressing the "A" or "X" button on the Unicorn Pack. The last selected view is saved and automatically loaded upon reboot.
The effects in this software are written in Python and designed to be easy to use, modify individually, and test. Suggestions for new effects or animations are always welcome. Thank you for checking out this project!
[ Index ]
Part | Price (USD) |
---|---|
Raspberry Pi Pico | $5.00 |
Pimoroni Unicorn Pack | $24.00 |
[ Index ]
Have another idea? Share it here. You can also fork this repo and submit a pull request with your own effect or animation! I'd love to see what you come up with.
[ Index ]
First make sure you have this repo cloned to your computer. If you don't have Git installed, you can download the repo as a ZIP file by clicking the green "Code" button at the top of this page. Follow the steps below to run the Python scripts in this repository on your Raspberry Pi Pico with the Pimoroni Unicorn Pack:
- Install the Pimoroni custom software to your Raspberry Pi Pico by following the official guide.
- Download and install the Thonny IDE from the official website.
This allows us to write and run Python code on the Raspberry Pi Pico.
- Open Thonny and connect your Raspberry Pi Pico to your computer using a USB cable.
- On the left hand side you should see the file explorer for your Raspberry Pi Pico. Drag and drop all the files from the
scripts
folder in this repository to the root directory of your Raspberry Pi Pico. - Unplug and replug your Raspberry Pi Pico to restart the device.
The file main.py
will automatically run when the Raspberry Pi Pico is powered on.
[ Index ]
Button layout
|==================================|
| (A) oooooooooooooooooooooooo (X) |
| oooooooooooooooooooooooo |
| (B) oooooooooooooooooooooooo (Y) |
|==================================|
Button | Action |
---|---|
"A" | Previous view. |
"X" | Next view. |
"B" | Nothing (yet). |
"Y" | Nothing (yet). |
[ Index ]
-
Make sure you have Python installed on your computer (3.8+). You can download Python from the official website.
-
Run the following in a terminal at the root of this repository to install development dependencies:
# Install the required packages
python3 -m pip install -r requirements.txt
# Install the pre-commit hooks
pre-commit install
# Update the pre-commit hooks
pre-commit autoupdate
-
Make your code changes using Thonny, add new views, fix a bug, etc.
-
Test using Thonny by connecting your Raspberry Pi Pico to your computer. Run the
main.py
script or any view script individually by pressing the "Run" button with the file open. -
When your changes are in you can optionally run the following commands to lint and format your code:
# Format
python3 -m black scripts/
# Lint
python3 -m flake8 --show-source --ignore E501 scripts/
These scripts will also run automatically when you commit changes (pre-commit hooks) to ensure code quality.
- Submit a pull request with your changes.
[ Index ]
This project is licensed under the Apache License, Version 2.0. See the APACHE_2_LICENSE file for the pertaining license text.
SPDX-License-Identifier: Apache-2.0
[ Index ]
Thanks to all the people and projects that made this possible! I hope you enjoy this project as much as I enjoyed working on it. If you have any questions, please let me know by opening an issue here.
Type | Info |
---|---|
webmaster@codytolene.com | |
https://www.buymeacoffee.com/codytolene | |
bc1qfx3lvspkj0q077u3gnrnxqkqwyvcku2nml86wmudy7yf2u8edmqq0a5vnt |
Fin. Happy programming friend!
Cody Tolene