Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Unicorn HAT (HD) simulator - Originally by Jannis Hermanns <jannis@gmail.com>

Project description

Simulates an Unicorn HAT HD (and should work for the 8x8 HAT and the 8x4 PHAT as well) using pygame.

Usage

If you want your code to run on your computer as well as your Pi, you could do something like this:

  1. pip install unicorn-hat-sim (or pip2 or pip3 depending on your setup)
  2. Adjust your import unicornhathd statement as follows:
try:
    import unicornhathd as unicorn
    print("unicorn hat hd detected")
except ImportError:
    from unicorn_hat_sim import unicornhathd as unicorn

You can choose from import unicornhathd (16x16), import unicornhat (8x8) and import unicornphat (8x4).

Demo

(Note that this gif has a low framerate, the simulator runs nice and smooth in real life)

Demo

Demo

TODO

  • [ ] find a python person who shows me how this would be done properly
  • [ ] fix/check rotation
  • [ ] add a proper LED glow effect so it looks more like a real unicorn HAT
  • [ ] publish via pip

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for unicorn-hat-sim, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size unicorn_hat_sim-1.0.0-py2.py3-none-any.whl (3.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size unicorn-hat-sim-1.0.0.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page