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
Latest/development library from GitHub:
git clone https://github.com/pimoroni/unicornhatmini-python
cd unicornhatmini-python
sudo ./install.sh
Follow the “installing the software” instructions to install modules and example files:
Open Thonny and click “load”
Navigate into the documents folder, and into the “unicornhatmini-python” folder, then into the examples folder.
Open and run any of the examples.
Try this simple example:
Example of controlling one or all pixels unicorn_pixel.py
Try to create your own sketch by following some of the tutorials on “using the software” part of this page: https://learn.pimoroni.com/tutorial/hel/getting-started-with-unicorn-hat-mini
See the list of commands and even more examples here. There's even an example of how to display an image.
Challenges
Program four quadrants, each with a different color.
Can you create a loop the cycles through a random color every 1 second.
Can you have a random pixel light a random color over and over, slowly filling the grid with color?
Have a dot move back and forth across the screen. what about up and down?
Use the buttons to move a dot in four directions.
Make a snake that moves around the pixel space.