# Unicornhat not working (Software problem?)

**URL:** <https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673>\
**Category:** Support\
**Created:** [January 17, 2019, 5:10am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673 "2019-01-17T05:10:37Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![LastUnicorn](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@LastUnicorn](https://forums.pimoroni.com/u/LastUnicorn)\
**Post date:** [January 17, 2019, 5:10am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/1 "2019-01-17T05:10:37Z")

</div>

Hi all,  
I am new in using a Raspberry Pi, as well as I am new in programming. So I followed Intructions for soldering the pi an the uniornhat, installed raspbian lite stretch. connectet my pi with a shell and downloaded the curl script for unicornhat. but it does not work. By using a Script for a GPIO Input and Output the hat will light up. So I do not know why the Scripts from the Librarie wont run.  
Would be great if someone has an idea.  
Thanks  
LastUnicorn

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [January 17, 2019, 9:38am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/2 "2019-01-17T09:38:24Z")

</div>

Is this Unicorn HAT or Unicorn HAT HD and are you using the right library since they - confusingly enough - work in totally different ways and have different libraries.

---

<div class="post-metadata">

**Author:** ![LastUnicorn](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@LastUnicorn](https://forums.pimoroni.com/u/LastUnicorn)\
**Post date:** [January 18, 2019, 5:17am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/3 "2019-01-18T05:17:14Z")

</div>

It is an Unicorn pHAT and I took this library  
curl [https://get.pimoroni.com/unicornhat](https://get.pimoroni.com/unicornhat) | bash

---

<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:** [January 18, 2019, 11:52am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/4 "2019-01-18T11:52:34Z")

</div>

From here, [https://github.com/pimoroni/unicorn-hat](https://github.com/pimoroni/unicorn-hat) the one line installer is as follows  
curl -sS [https://get.pimoroni.com/unicornhat](https://get.pimoroni.com/unicornhat) | bash

---

<div class="post-metadata">

**Author:** ![LastUnicorn](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@LastUnicorn](https://forums.pimoroni.com/u/LastUnicorn)\
**Post date:** [January 19, 2019, 7:01am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/5 "2019-01-19T07:01:30Z")

</div>

I tried this by removing the first Pimoroni library and installing it from this link you showed. No change. Could there something be wrong in the raspi-gpio or RPI.GPIO?

---

<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:** [January 19, 2019, 10:09am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/6 "2019-01-19T10:09:21Z")

</div>

Could you please post a picture of your soldering on the Pi.

---

<div class="post-metadata">

**Author:** ![LastUnicorn](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@LastUnicorn](https://forums.pimoroni.com/u/LastUnicorn)\
**Post date:** [January 20, 2019, 6:17am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/7 "2019-01-20T06:17:52Z")

</div>

![20190120_071130](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/d/d06c0f62bc9a442c58016213a76b9f5f6a83ebb0.jpeg) ![20190120_071202](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/1/144ab8a7f00fad33357dbed2ae5d454f0b3a6ddb.jpeg) ![20190120_071210](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/d/d00bd9e8d0e2f478f7eeceb4fe65bd14083417fe.jpeg)

---

<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:** [January 20, 2019, 10:00am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/8 "2019-01-20T10:00:53Z")

</div>

Pin 1 on the Pi doesn’t look to good. And the Unicorn pHat looks pretty rough. Just being honest. Practice makes perfect. Have a look at this. [https://learn.pimoroni.com/tutorial/sandyj/the-ultimate-guide-to-soldering](https://learn.pimoroni.com/tutorial/sandyj/the-ultimate-guide-to-soldering)  
I think you may have a couple cold soldered joints in there.  
 ![soldering101](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/8/8344b70bd0a3785487c5b17c1100632ef1342f42.png)

---

<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:** [January 20, 2019, 10:15am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/9 "2019-01-20T10:15:43Z")

</div>

Something else I think I should mention. If thats carpet in your pictures thats a no no. You don’t want to put bare unprotected electronics on carpet. You run the risk of an electrostatic discharge which can damage electronics.  
What I do is save the antistatic bags my stuff comes in. Then put my boards on top of it. Or stick to a nice wooden desktop etc.  
Don’t let this setback deter you or spoil your fun. Sometimes things don’t go as planned, been there done that. Still happens to me even after many years working with electronics.

---

<div class="post-metadata">

**Author:** ![major\_tomm](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/major_tomm/32/9044_2.png) [@major\_tomm](https://forums.pimoroni.com/u/major_tomm)\
**Post date:** [January 20, 2019, 12:18pm UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/10 "2019-01-20T12:18:53Z")

</div>

I’d also double check that you’re putting the HAT on in the correct orientation, those right angled headers on the wrong side of the board are making it difficult for me to figure out which way it should be.

---

<div class="post-metadata">

**Author:** ![major\_tomm](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/major_tomm/32/9044_2.png) [@major\_tomm](https://forums.pimoroni.com/u/major_tomm)\
**Post date:** [January 20, 2019, 12:24pm UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/11 "2019-01-20T12:24:49Z")

</div>

Actually, given how it’s soldered, I don’t think it’s possible for you to connect it properly without some jumper cable shenanigans.

---

<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:** [January 20, 2019, 12:55pm UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/12 "2019-01-20T12:55:46Z")

</div>

Wow, good observation, I completely missed it was soldered on the wrong side of the Pi.  
Thats a bummer for sure. I don’t believe its possible to mate the two directly header to header and get the pinout correctly matched.  
I’ve used 90 headers no problem. I do usually triple check its correctly orientated before soldering. Its an easy thing to do to get it wrong.

---

<div class="post-metadata">

**Author:** ![LastUnicorn](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@LastUnicorn](https://forums.pimoroni.com/u/LastUnicorn)\
**Post date:** [January 21, 2019, 4:49am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/13 "2019-01-21T04:49:48Z")

</div>

Hmm… that sounds not so good.  
When I finished the soldering I saw in videos an on photos that there is the soldering on the other side. But I thought, when I turn the pHAT upside down as well, it is double turned and so it will work. I could light up the HAT by using a script for a GPIO Input and Output, so I thought it will work out and it could not be a hardware problem.  
But now I know it better.

Do you have an idea how I can fix the problem?  
@major_tomm: You said something about a jumper cable? Is there something like this?

---

<div class="post-metadata">

**Author:** ![major\_tomm](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/major_tomm/32/9044_2.png) [@major\_tomm](https://forums.pimoroni.com/u/major_tomm)\
**Post date:** [January 21, 2019, 7:49am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/14 "2019-01-21T07:49:56Z")

</div>

Pimoroni sell [jumper jerky](https://shop.pimoroni.com/products/jumper-jerky?variant=304797129&gclid=CjwKCAiA1ZDiBRAXEiwAIWyNC8dJSNbYyUepVHgzXokXSWM5oLDuSpBNhh7UsLzeOGHpbBHqf5sfQBoCLqUQAvD_BwE) that can be used along with the [pinout](https://pinout.xyz/pinout/unicorn_phat) to hook it up properly.

---

<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:** [January 21, 2019, 10:05am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/15 "2019-01-21T10:05:44Z")

</div>

You want the male to female jumper jerky, just for clarification.  
Or get another Pi Zero, and a new header, and have another try.  
The 90 degree header will work, when soldered on the correct side of the Pi.

---

<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:** [January 21, 2019, 10:16am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/16 "2019-01-21T10:16:12Z")

</div>

If you look at the Pi Zero ( really easy to see before you solder it) there will be one square solder pad. That is pin 1 of the GPIO. Same deal with the Unicorn pHat, there is one square solder pad that marks the pin 1 location.  
Pin 1 has to go to pin 1, pin 2 to pin 2 etc. With the Pi Zeros HDMI and USB jacks facing you, GPIO along the back, It goes  
2,4,6,8,…, 40  
1,3,5,7,…, 39

---

<div class="post-metadata">

**Author:** ![LastUnicorn](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@LastUnicorn](https://forums.pimoroni.com/u/LastUnicorn)\
**Post date:** [January 22, 2019, 4:56am UTC](https://forums.pimoroni.com/t/unicornhat-not-working-software-problem/9673/17 "2019-01-22T04:56:09Z")

</div>

Okay guys now I have an idea how to go on to finally finish my project.  
Thanks a lot for spending so much time in solving my problem.  
LastUnicorn
