Skip to content

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.

License

Notifications You must be signed in to change notification settings

CodyTolene/Unicorn-Pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unicorn-Pi

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

Build Status

Python Linting

[ Index ]

Parts List

Part Price (USD)
Raspberry Pi Pico $5.00
Pimoroni Unicorn Pack $24.00

[ Index ]

Previews

Name Preview
Digital Clock Digital Clock
Digital Rain Digital Rain
DVD Bouncer DVD Bouncer
Emergency Emergency
Fire Fire
Fireflies Fireflies
Fireplace Fireplace
Fireworks Fireworks
Flashlight Torch Flashlight Torch
Lava Lamp Lava Lamp
Lightning Lightning
Plasma Plasma
Rainbow (default) Rainbow
Raindrops Raindrops
SOS (Morse Code) SOS
Snowfall Snowfall
Warp Speed Warp Speed
Wave Wave

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 ]

Software Setup

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:

  1. Install the Pimoroni custom software to your Raspberry Pi Pico by following the official guide.
  2. Download and install the Thonny IDE from the official website.

    Info This allows us to write and run Python code on the Raspberry Pi Pico.

  3. Open Thonny and connect your Raspberry Pi Pico to your computer using a USB cable.
  4. 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.
  5. 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 ]

Software Guide

Button layout

|==================================|
| (A) oooooooooooooooooooooooo (X) |
|     oooooooooooooooooooooooo     |
| (B) oooooooooooooooooooooooo (Y) |
|==================================|
Button Action
"A" Previous view.
"X" Next view.
"B" Nothing (yet).
"Y" Nothing (yet).

[ Index ]

Development

  1. Make sure you have Python installed on your computer (3.8+). You can download Python from the official website.

  2. 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
  1. Make your code changes using Thonny, add new views, fix a bug, etc.

  2. 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.

  3. 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/

Info These scripts will also run automatically when you commit changes (pre-commit hooks) to ensure code quality.

  1. Submit a pull request with your changes.

[ Index ]

Licensing

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 ]

Wrapping Up

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

About

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.

Resources

License

Stars

Watchers

Forks

Languages