Raspberry Pi Pinout

Unicorn pHAT

32 blindingly bright LEDs packed into a pHAT and driven with an ultra-fast, C library that you can talk to from Python make Unicorn HAT PiGlow's bigger, brighter brother.

Note: Unicorn pHAT uses some special PWM trickery, performed with the same hardware that lets your Pi produce sound through the audio jack ( analog audio ) so you can't use both at the same time!

To get the HAT set up and ready to go you can use the one-line product installer:

curl -sS https://get.pimoroni.com/unicornhat | bash

Then import it into your Python script and start tinkering:

import unicornhat
unicornhat.set_layout(unicornhat.PHAT)
unicornhat.set_pixel(0, 0, 255, 255, 255)
unicornhat.show()

Details

Unicorn pHAT