I’m creating a forum post pending a full, step-by-step tutorial for the Pimoroni Unicorn Hat. It’s a super nice piece of gear, but I know some people have encountered problems trying to get it working before.
I’ve had success with this method on the simple.py
script running on both the Raspberry Pi 3 B and Pi Zero W.
I’ll be referring to steps from the Pimoroni Tutorial
- Setting up Unicorn Hat - I’ve had problems running the installer before. The only fix I have for that now is to follow the installation guide on a fresh installation or Raspbian or Raspbian LITE. Using NOOBS is ok too.
-
Verify that Unicorn Hat is installed and working - Run example scripts from the terminal: Make sure you’re in the examples directory (usually
/home/pi/Pimoroni/unicornhat/examples
), and executesudo python simple.py
. Running withoutsudo
throws a permissions error and running from the Python interface doesn’t produce a result. - Note that if only half your display lights up when running
simple.py
, you should edit the line that readsunicorn.set_layout(unicorn.AUTO)
to readunicorn.set_layout(unicorn.HAT)
. I’ve found it unecessary to edit this line when running a Rasbpian after installing it with NOOBS. Installations of bare Raspbian by flashing the image to the SD card directly required the line-modification.