# Only half my lights are active on my UnicornHat

**URL:** <https://forums.pimoroni.com/t/only-half-my-lights-are-active-on-my-unicornhat/3065>\
**Category:** Raspberry Pi\
**Created:** [September 20, 2016, 3:29am UTC](https://forums.pimoroni.com/t/only-half-my-lights-are-active-on-my-unicornhat/3065 "2016-09-20T03:29:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcharling](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@dcharling](https://forums.pimoroni.com/u/dcharling)\
**Post date:** [September 20, 2016, 3:29am UTC](https://forums.pimoroni.com/t/only-half-my-lights-are-active-on-my-unicornhat/3065/1 "2016-09-20T03:29:34Z")

</div>

I’m sure I’m doing something wrong, but I’m not a hardware guy. So far I’ve been able to muddle along, but today I’m stumped.

I have a Raspberry Pi3. I have a camera installed and active. I decided to install one of Mausberry Circuit’s cool little rocker switches to turn on/off my Pi. I would like to install the Unicorn Hat by using GPIO PINS. I have included a picture below of my setup. Hopefully you can see what I’ve done. I followed the PIN set up from another post on this forum. I am using 2 (the first PIN on the right side), GND (the fifth PIN on the left side), and GPIO 18 (the 6th PIN on the right side).

Today I ran the following to install the Unicorn Hat software.  
`curl -sS get.pimoroni.com/unicornhat | bash`

I have run sudo apt-get update and upgrade.

Still when I run `sudo ./detect.py` it says I’m using a Unicorn pHat and if I run `sudo ./demo.py` I only get 4 of the 8 rows to light up.

Thanks for any assistance!

 ![](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/c/cd576760ca7c57f8a337072a1c121f116a2c8d84.JPG)

---

<div class="post-metadata">

**Author:** ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)\
**Post date:** [September 20, 2016, 9:28am UTC](https://forums.pimoroni.com/t/only-half-my-lights-are-active-on-my-unicornhat/3065/2 "2016-09-20T09:28:39Z")

</div>

That is completely normal. The detection scheme probes the system for information registered by the Unicorn eeprom at boot time.

You should either wire up pin27/28 or just enforce the layout in your scripts with `set_layout(unicornhat.HAT)` as per instruction of [detect.py](http://detect.py).

---

<div class="post-metadata">

**Author:** ![dcharling](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@dcharling](https://forums.pimoroni.com/u/dcharling)\
**Post date:** [September 21, 2016, 1:24am UTC](https://forums.pimoroni.com/t/only-half-my-lights-are-active-on-my-unicornhat/3065/3 "2016-09-21T01:24:22Z")

</div>

Indeed, you are correct. I’m a tad embarrassed. Thanks for your help! I’m shooting sparkling rainbows everywhere.
