Hats are modules that require little-to-no soldering and are designed quickly expand the ability of your raspberry pi. The designer will usually also provide a library to make programming more accessible.
Start by powering down the pi and plugging in the hat. Do not flip the unicorn hat. YOU WILL DESTROY IT. See orientation below
Follow the “installing the software” instructions to install modules and example files:
Clone the example library by typing the following commands in the Terminal.
$ cd Documents
$ git clone https://github.com/pimoroni/unicorn-hat-hd.git
Look for a folder of examples inside the Pi Documents folder. It will be called unicorn-hat-hd
Open Thonny and click “load”
Navigate into the documents folder, and into the “unicorn-hat-HD” folder, then into the examples folder.
Start with the test.py example which lights each pixel with a random color.
Try to create your own sketch by looking at this simple example that lights up a single pixel at X location 10 and Y location 10, followed by lighting all the pixels with a nested for loop: unicornhd_learning.py
Challenges
Program four quadrants, each with a different color.
Can you have a random pixel light a random color over and over, every second, slowly filling the grid with color?
Have a dot move back and forth across the screen. what about up and down?
Make a snake that moves around the pixel space.