# Unicorn HAT mini not recognized

**URL:** <https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890>\
**Category:** Support\
**Created:** [May 12, 2020, 5:53pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890 "2020-05-12T17:53:33Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![placebo83](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/placebo83/32/6800_2.png) [@placebo83](https://forums.pimoroni.com/u/placebo83)\
**Post date:** [May 12, 2020, 5:53pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/1 "2020-05-12T17:53:33Z")

</div>

Hello!

I just got the Unicorn HAT mini but I don’t get it to work.  
I installed Raspbian Buster on a pi zero WH, installed the library from GitHub, but when I want to run an example I get following error:

Traceback (most recent call last):  
File “./rainbow.py”, line 6, in   
from unicornhatmini import UnicornHATMini  
ModuleNotFoundError: No module named ‘unicornhatmini’

I did another fresh install of Raspbian and the library, but the problem stays, I tried like 5 of the examples and get the same error. I re-attached the HAT also several times, the connectors and everything looks fine. I would get my hands on another of my Pies within the next days to see if the problem also occurs on another Pi.

Does anybody have an idea what could be the problem? I hope I didn’t get a DOA HAT.

---

<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:** [May 12, 2020, 6:09pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/2 "2020-05-12T18:09:13Z")

</div>

Try `sudo pip3 install unicornhatmini` and double check the i2c is enabled in Raspberry Pi Configuration. I think it uses i2c?

---

<div class="post-metadata">

**Author:** ![placebo83](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/placebo83/32/6800_2.png) [@placebo83](https://forums.pimoroni.com/u/placebo83)\
**Post date:** [May 12, 2020, 6:21pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/3 "2020-05-12T18:21:00Z")

</div>

Thanks for the fast reply, sadly I receive the same kind of message:

Traceback (most recent call last):  
File “./rainbow.py”, line 6, in   
from unicornhatmini import UnicornHATMini  
File “/usr/local/lib/python3.7/dist-packages/unicornhatmini/ **init**.py”, line 10, in   
import RPi.GPIO as GPIO  
ModuleNotFoundError: No module named ‘RPi’

and with another example also this one:

Traceback (most recent call last):  
File “./simon.py”, line 8, in   
from gpiozero import Button  
ModuleNotFoundError: No module named ‘gpiozero’

i2c was enabled but double hecked it anyways.

---

<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:** [May 12, 2020, 6:23pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/4 "2020-05-12T18:23:29Z")

</div>

Raspbian Lite or Raspbian with Desktop?

---

<div class="post-metadata">

**Author:** ![placebo83](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/placebo83/32/6800_2.png) [@placebo83](https://forums.pimoroni.com/u/placebo83)\
**Post date:** [May 12, 2020, 6:24pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/5 "2020-05-12T18:24:24Z")

</div>

Raspbian Lite, Desktop is taking too much ressources and not needed for this project.

---

<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:** [May 12, 2020, 6:27pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/6 "2020-05-12T18:27:43Z")

</div>

Ah, my best guess is your missing something that would normally be there in the with Desktop version. gpiozero maybe?  
What I often do is install the Desktop version, and when I’m all done with my setup, I set it to boot to command line instead of to the Desktop GUI. It’s almost as good as going with the Lite version.

---

<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:** [May 12, 2020, 6:29pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/7 "2020-05-12T18:29:33Z")

</div>

One option is to try the github clone option.

`git clone https://github.com/pimoroni/unicornhatmini-python`  
`cd unicornhatmini-python`  
`sudo ./install.sh`

---

<div class="post-metadata">

**Author:** ![placebo83](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/placebo83/32/6800_2.png) [@placebo83](https://forums.pimoroni.com/u/placebo83)\
**Post date:** [May 12, 2020, 6:33pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/8 "2020-05-12T18:33:02Z")

</div>

Ok, it was the missing gpiozero in Raspbian lite, I installed it and now it works!  
Thanks a lot for the help!

The GibHub clone is what I always do to “install” a python library so that shouldn’t be the problem too.

---

<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:** [May 12, 2020, 6:42pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/9 "2020-05-12T18:42:12Z")

</div>

That’s good to hear you got it working. I have one on the way, it should arrive any day now. I like using the clone option as it gets you all the example files.  
Near as I can tell, from posts on the Pi foundation Forum, there is stuff missing from the Buster Lite release, that was in previous Lite releases? That’s what it sounds like anyway. They made it even lighter.

---

<div class="post-metadata">

**Author:** ![placebo83](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/placebo83/32/6800_2.png) [@placebo83](https://forums.pimoroni.com/u/placebo83)\
**Post date:** [May 12, 2020, 6:46pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/10 "2020-05-12T18:46:02Z")

</div>

It’s nice they make it lighter but for noobs like me Linux in general isn’t the easiest thing to use. I hope you Unicorn mini arrives soon so you can start tinkering with it.

---

<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:** [May 12, 2020, 6:50pm UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/11 "2020-05-12T18:50:13Z")

</div>

They also striped some stuff out of the With Desktop version. I have to manually install Idle now. They want you to use Thorny.

---

<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:** [May 13, 2020, 11:41am UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/12 "2020-05-13T11:41:19Z")

</div>

You don’t happen to know if the Mini uses i2c or SPI? If it doesn’t show up via `i2cdetetct -y 1` I’d assume its SPI. I could have sworn I saw a note saying it used i2c but can’t find it now? No pinout on the pinout site either?

---

<div class="post-metadata">

**Author:** ![Shoe](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Shoe](https://forums.pimoroni.com/u/Shoe)\
**Post date:** [May 13, 2020, 11:48am UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/13 "2020-05-13T11:48:29Z")

</div>

The chips in the description and on the underside images are marked HT16D35A, which is the SPI version according to the datasheet.

---

<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:** [May 13, 2020, 11:53am UTC](https://forums.pimoroni.com/t/unicorn-hat-mini-not-recognized/13890/14 "2020-05-13T11:53:44Z")

</div>

OK, I was thinking it was likely SPI like the Unicorn Hat HD. I was going to use it with my Breakout garden mini, I’ll just have to remember to unplug the SPI LCD breakout first.
