TUTORIALS Mutiple HATs
How to easily create multi-HAT Pi projects
PHAT STACK
Les Pounder serves up a double helping of Raspberry Pi HATs for a pHAT project. Can he manage another slice of Pi, though…?
Credit: https://shop.pimoroni.com
OUR EXPERT
Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his adventures and projects at bigl.es.
YOU NEED
> Any Pi
> Pi OS
> Pimoroni pHAT Stack
> Pimoroni Unicorn HAT
> Pimoroni Skywriter
> Male GPIO extension header
> M2.5 standoffs
> Code at https:// github.com/ lesp/LXF- Unicorn- Sky/ archive/ refs/heads/ main.zip
Add-on boards for the Raspberry Pi, known as HATs, expand the usefulness of the $35 single board computer. The Pi has a single 40-pin GPIO header, but with pHAT Stack from Pmoroni we can add three HATs, or five pHATs to a single Pi. In this project we’re using two older HATs from Pimoroni. The Skywriter HAT is a gesture sensor that reacts to flicks, taps and touch using a sensor which can detect your fingers in the air. We’ll use Skywriter as an input to control the 64 NeoPixels housed inside of Unicorn HAT. The LEDs will change colour at the flick of our hand. Best of all, there is no wiring to worry about.
PHAT Stack connects to the Raspberry Pi GPIO via a ribbon cable. We can then attach our Skywriter and Unicorn HATs to the pHAT Stack. You may need to use GPIO extension headers and M2.5 standoffs to prevent the underside of the HATs touching any GPIO pins. When you’re ready, connect your keyboard, mouse and so on to the Raspberry Pi and power up to the desktop.