Skip to main content

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

Metadata

Release files for unicorn-hat-sim 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unicorn-hat-sim 1.0.0
File Size Uploaded
unicorn-hat-sim-1.0.0.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unicorn-hat-sim 1.0.0
File Interpreter ABI Platform
unicorn_hat_sim-1.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 6.4 kB

Release files / unicorn-hat-sim-1.0.0.tar.gz

Download URL unicorn-hat-sim-1.0.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9fdae420e340a3908345468a9443b9d00056fe42fa16187c146e2095d5a73963
BLAKE2b-256 checksum
How to use checksums
3dc3497352f229e30edc9ff16e0fd499bc19b6c09c0252b24612f2d472b26c85
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / unicorn_hat_sim-1.0.0-py2.py3-none-any.whl

Download URL unicorn_hat_sim-1.0.0-py2.py3-none-any.whl
Size 3.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5fd0b49a8bd32cd70defe33c03e4b1221f1fe8731df8711e112f173cabbc01bb
BLAKE2b-256 checksum
How to use checksums
208483ae3d939422efb9ff769d4a0b1535d49fb2f3b3f117282a4d3b9691cc8f
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page