# Issue with UnicornHat on Pi Zero WH

**URL:** <https://forums.pimoroni.com/t/issue-with-unicornhat-on-pi-zero-wh/14670>\
**Category:** Support\
**Created:** [August 7, 2020, 11:33am UTC](https://forums.pimoroni.com/t/issue-with-unicornhat-on-pi-zero-wh/14670 "2020-08-07T11:33:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cillian](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@cillian](https://forums.pimoroni.com/u/cillian)\
**Post date:** [August 7, 2020, 11:33am UTC](https://forums.pimoroni.com/t/issue-with-unicornhat-on-pi-zero-wh/14670/1 "2020-08-07T11:33:57Z")

</div>

Hi there,

Hoping that someone could help. I have a new Unicorn pHAT that I have installed on a Pi Zero WH.

- I’m running Raspian Buster, fully updated, all dependencies are present. SPI is enabled.

- I can run detect.py and it returns that a pHAT is connected, and can run any of the examples without returning errors.

However the pixels don’t light up on the Unicornhat.

Linux pizero 4.19.118+ #1311 Mon Apr 27 14:16:15 BST 2020 armv6l GNU/Linux  
PRETTY\_NAME=“Raspbian GNU/Linux 10 (buster)”  
NAME=“Raspbian GNU/Linux”  
VERSION\_ID=“10”  
VERSION=“10 (buster)”  
VERSION\_CODENAME=buster

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [August 7, 2020, 3:43pm UTC](https://forums.pimoroni.com/t/issue-with-unicornhat-on-pi-zero-wh/14670/2 "2020-08-07T15:43:43Z")

</div>

Did you try running them as sudo?

---

<div class="post-metadata">

**Author:** ![cillian](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@cillian](https://forums.pimoroni.com/u/cillian)\
**Post date:** [August 8, 2020, 5:14am UTC](https://forums.pimoroni.com/t/issue-with-unicornhat-on-pi-zero-wh/14670/3 "2020-08-08T05:14:36Z")

</div>

Hi, yes am running as sudo. Have tried using IDLE and via Terminal.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [August 8, 2020, 9:00am UTC](https://forums.pimoroni.com/t/issue-with-unicornhat-on-pi-zero-wh/14670/4 "2020-08-08T09:00:29Z")

</div>

Ok, was a bit of a shot in the dark. I have the new Unicorn Hat Mini, and a Unicorn Hat HD. I don’t have the Hat though. I remembered a thread complaining about having to run as sudo with the Hat. Is your hat firmly pressed down / attached to the GPIO?

---

<div class="post-metadata">

**Author:** ![cillian](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@cillian](https://forums.pimoroni.com/u/cillian)\
**Post date:** [August 8, 2020, 12:16pm UTC](https://forums.pimoroni.com/t/issue-with-unicornhat-on-pi-zero-wh/14670/5 "2020-08-08T12:16:17Z")

</div>

Not a problem, thanks for asking.

I’ve looked into a bunch of things, and am a little embarrassed to say the issue was that I have a Unicorn Hat Mini, not a pHAT. The Unicorn Hat Mini runs off a different library to the other unicorn hats, accessible here. [https://github.com/pimoroni/unicornhatmini-python](https://github.com/pimoroni/unicornhatmini-python)

After installing the right library, all working.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [August 8, 2020, 12:36pm UTC](https://forums.pimoroni.com/t/issue-with-unicornhat-on-pi-zero-wh/14670/6 "2020-08-08T12:36:35Z")

</div>

That happens, no harm done though, other than some time wasted and some head scratching.  
Yeah, the pinouts are different, and they way they work is just enough different that you have to edit the examples to get them to work on a different Unicorn than what they were written for. Or run scroll hat code on a Unicorn etc.

> [@Adjust Python examples](https://forums.pimoroni.com/t/adjust-python-examples/13954/):
>
> I have an Unicorn HAT Mini, and saw that there are some nice Python examples for the Scroll HAT Mini (like the clock) which are not in the example library for the Unicorn HAT Mini. Does anybody has some tips which parts have to be changed so Scroll HAT Mini scripts run on a Unicorn HAT Mini?
