Skip to main content

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


Download files

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

Source Distribution

unicorn-hat-sim-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

unicorn_hat_sim-1.0.0-py2.py3-none-any.whl (3.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file unicorn-hat-sim-1.0.0.tar.gz.

File metadata

  • Download URL: unicorn-hat-sim-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15rc1

File hashes

Hashes for unicorn-hat-sim-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9fdae420e340a3908345468a9443b9d00056fe42fa16187c146e2095d5a73963
MD5 ea4ed92b171573698d3f9a0a95ce6aae
BLAKE2b-256 3dc3497352f229e30edc9ff16e0fd499bc19b6c09c0252b24612f2d472b26c85

See more details on using hashes here.

File details

Details for the file unicorn_hat_sim-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: unicorn_hat_sim-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15rc1

File hashes

Hashes for unicorn_hat_sim-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5fd0b49a8bd32cd70defe33c03e4b1221f1fe8731df8711e112f173cabbc01bb
MD5 3f871ddc6fe108d68973d3ed9d5472c5
BLAKE2b-256 208483ae3d939422efb9ff769d4a0b1535d49fb2f3b3f117282a4d3b9691cc8f

See more details on using hashes here.

Supported by

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