Raspberry Pi Zero and Unicorn Hat

after making my first experience with the Unicorn Hat on a Raspberry Pi 2, I wanted to move to a RPi0, because of the smaller footprint.

At first, the Unicorn Hat didn’t want to work as usual. Only one LED was green, nothing else did show up.

After fiddling around and doing some g**gle, I was able to solve the issue:

Following the instructions from adafruit https://learn.adafruit.com/adding-basic-audio-ouput-to-raspberry-pi-zero/pi-zero-pwm-audio I changed the mode of pin 12 (BCM18) from previous input mode to ALT5 (PWM0).

The question is: wouldn’t it be nice if your Unicorn library could check for the right mode of this pin?
Writing a warning to the console helps to determine the cause of the issue very easily.
Just my 2 cents.


That’s interesting. I think you took the long way around though, AFAIK this is handled at low-level by the ws281x lib, but something else is at play in recent version of Raspbian.

I do know that there’s been some changes to the repo recently that may also throw factors in the picture that I’m not aware of… how did you install the unicorn library, from git or using the one-liner installer?

I used the one-liner installer.

hum, strange indeed… the one-liner should get you a working setup out of the box. A few more questions then:

  • are you using Jessie lite or full
  • headless Pi or hooked up to HDMI
  • any other customisation you would have done, particularly related to sound configuration
  • I’m using Jessie lite
  • it’s a headless Pi
  • it’s a ZERO, there is no analog sound

I just swapped the working SDHC-Card and the Unicorn from a RPi2 to the RPi0.