Code Monkey home page Code Monkey logo

unicorn-remote's Introduction

Unicorn Remote Logo

Code Climate

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.

Web UI screenshot Demo animation

Setup

  1. Follow first time setup for Unicorn HAT or Unicorn HAT HD

  2. Clone or download the repository:

git clone https://github.com/njbbaer/unicorn-remote.git
cd unicorn-remote
  1. Create a virtual environment (recommended)
virtualenv venv
  1. Either enter the virtual environment with source venv/bin/activate or prefix commands with venv/bin/.

  2. Install dependencies

pip install -r requirements.txt
  1. Start Unicorn Remote
python run.py

Optional Arguments

-o --original use original 8x8 unicorn hat
-d --debug enable Flask debugging mode
-p --port <port> set port number (default 5000)

Web Interface

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, and Stop to end it.

Custom Programs

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!

REST API

Start a program by placing a PUT request:

PUT /api/program/<program_name>
  • All programs also accept optional query parameters for brightness and rotation.

Stop the currently running program:

PUT /api/stop

Testing

Run the test suite. Enjoy the light show.

python -m unittest

Contribute

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.