By virture of the Unicorn HAT being a HAT(!), and hence using the Raspberry Pi's GPIO pins, all of these examples must be run with sudo
, for example
sudo ./clock.py
or
sudo python clock.py
Uses graphics.py
and shows how you can, but probably shouldn't, display an analogue clock on Unicorn HAT!
Multi-effect demo; twisty swirly goodness, roto-zooming checker board, weeee waaaah, rainbow search spotlights and zoom tunnel
Knock, knock, Neo.
Demonstrates the use of colorsys
to animate through colour hues.
Blinks a rainbow spot light on and off. Change fwhm
to make the spot more/less focused (smaller numbers = more focused/larger numbers = less focused).
Blinks random yellow-orange-red LEDs.
Random multi-coloured sparkles.
Use your web browser to pixel paint onto Unicorn HAT.
Requirements:
sudo pip install flask
Shows how you can open and display a PNG image file, great for sprite animations.
Requirements:
sudo pip install pillow
Sets each pixel in turn and updates the display.