Skip to main content

Unicorn HAT (HD) simulator - Originally by Jannis Hermanns <jannis@gmail.com>, modified by Mark Pitman <mark.pitman@gmail.com> and then adjusted by Matt Brash <matt@brash.ca>

Project description

Unicorn HAT (HD) simulator

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 unicornhatsimulator (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

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


Download files

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

Source Distribution

unicornhatsimulator-1.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unicornhatsimulator-1.0.1-py2.py3-none-any.whl (3.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file unicornhatsimulator-1.0.1.tar.gz.

File metadata

  • Download URL: unicornhatsimulator-1.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9

File hashes

Hashes for unicornhatsimulator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ad2643eae77f921b300b6a56785b55dff6c7dd2a4bbc18ba1180b930f349918b
MD5 cba327722b049c995af60959f3a2db0c
BLAKE2b-256 7d7ac368c7bf56e96ccc11782b89b1a3b7725efad2dc4c6da5b6b284d2aa3786

See more details on using hashes here.

File details

Details for the file unicornhatsimulator-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: unicornhatsimulator-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9

File hashes

Hashes for unicornhatsimulator-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f763a5acf5868f07dda48d2ba3d92256a3788eb017e52c07affb13a500ad7982
MD5 1253ece652d031633ea75b33774463ec
BLAKE2b-256 197932a61d0cf7206f42c058182d32ce3b6ea02956898b0386f63ed789e8389c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page