32 light unicorn hat doesn't work


#1

I have a 32 light unicorn hat and raspberry pi 3. The pi has been updated and the relevant unicornhat library downloaded as per the tutorial. Ran simple.py in the terminal window to check the unicorn hat was correctly installed etc and nothing happened. Tried other codes in the folder but so far no lights.


#2

I suspect you mean the Unicorn pHAT? It could be an issue with the soldering of the header if so.

… does the example run without error? How have you installed the library?


#3

Thanks for the speedy reply. I used the curl -sS get.pimoroni.com/unicornhat | bash command in the terminal window.


#4

The example runs without error and ends with exiting cleanly.


#5

I would check that you have nice solid joints on the header, the important points for operation are outlined here:

http://forums.pimoroni.com/t/phat-header-soldering-the-lazy-way/


#6

Hi - resoldered and it works, but only when the programs are run from the terminal window using sudo python ./simple.py not from the python code.


#7

I’m not sure what you mean by ‘not from the python code’… if you mean using Idle then that would be because it isn’t running with sudo privileges, which is required for the unicorn.


#8

Hi sorry - poor choice of words on my part - still new to the pi and Python. You’re right I meant from idle.


#9

You can start Idle from the terminal with

sudo idle

it should then run the scripts too. Not sure it’s as convenient as you are used to, but it might be.