Tested on:RPi3; Raspbian Stretch; Python3
Prerequisites:Raspberry Pi with Raspbian Jessie and internet connection (see steps 1-7 in the Introduction)
Hardware:UnicornHAT hd

First experiments with the UnicornHAT

The UnicornHAT hd by Pimoroni is an extension for the Raspberry Pi with 16*16, thats 256 independently controllable 3-color-LEDs and a comfy API for handling them.

The manual installation like described in the GitHub-Repo is simply

Start a Game of Life for testing the HAT by entering

Demo application
Run the demo application by typing

The script iterates over all pixels and assigns a random color. First, the brightness is adjusted:

A brightness above 40% was impossible to film with my smartphone!
Now, iterate over all 16*16 pixels.

Give every pixel a randomly chosen color in the rgb range 256*256*256:

show() is necessary for showing the changes on the HAT.

Full script
Click on Full Script to show all of the code.

Pimoroni Webshop: https://shop.pimoroni.com
UnicornHAT API: http://docs.pimoroni.com/unicornhathd/
UnicornHAT on GitHub: https://github.com/pimoroni/unicorn-hat-hd

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.


Time limit is exhausted. Please reload CAPTCHA.