Unicorn Remote is a web based remote control for the Unicorn HAT LED matrix. It allows you to control light grid programs from a desktop or mobile browser and a web API.
Supports both the new Unicorn HAT HD 16x16 and original Unicorn HAT 8x8. It comes with a built-in set of programs for both, and allows you add your own.
The Unicorn HAT and HAT HD are available from Pimoroni.
If this software has been useful to you, please star the repository to show your interest.
-
Follow first time setup for Unicorn HAT or Unicorn HAT HD
-
Clone or download the repository:
git clone https://github.com/njbbaer/unicorn-remote.git
cd unicorn-remote
- Create a virtual environment (recommended)
virtualenv venv
-
Either enter the virtual environment with
source venv/bin/activate
or prefix commands withvenv/bin/
. -
Install dependencies
pip install -r requirements.txt
- Start Unicorn Remote
python run.py
-o
--original
use original 8x8 unicorn hat
-d
--debug
enable Flask debugging mode
-p
--port
<port>
set port number (default 5000)
Visit the web interface by directing a browser to the server's address.
http://localhost:5000
- Choose a program from the dropdown list.
- Select the desired brightness and display rotation.
- Press
Run
to start the program, andStop
to end it.
To add your own custom program, simply copy it into one of the follow directories:
app/programs/hd
for 32x32 programs
OR
app/programs/original
for original 16x16 programs
No additional configuration required!
Start a program by placing a PUT request:
PUT /api/program/<program_name>
- All programs also accept optional query parameters for
brightness
androtation
.
Stop the currently running program:
PUT /api/stop
Run the test suite. Enjoy the light show.
python -m unittest
- Star the repository to show your interest in this project.
- Give feedback, report bugs, and request features as GitHub issues.
- Improve the repository and submit a pull request.