# My Unicorn Hat doesn't work! \[SOLVED\]

**URL:** <https://forum.core-electronics.com.au/t/my-unicorn-hat-doesnt-work-solved/960>\
**Category:** Pimoroni\
**Created:** [12 May 2017 02:59 UTC](https://forum.core-electronics.com.au/t/my-unicorn-hat-doesnt-work-solved/960 "2017-05-12T02:59:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_R](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/michael_r/32/435_2.png) [@Michael\_R](https://forum.core-electronics.com.au/u/Michael_R)\
**Post date:** [12 May 2017 02:59 UTC](https://forum.core-electronics.com.au/t/my-unicorn-hat-doesnt-work-solved/960/1 "2017-05-12T02:59:53Z")

</div>

I’m creating a forum post pending a full, step-by-step tutorial for the[Pimoroni Unicorn Hat](https://core-electronics.com.au/pimoroni-unicorn-hat.html). It’s a super nice piece of gear, but I know some people have encountered problems trying to get it working before.  
I’ve had success with this method on the `simple.py` script running on both the [Raspberry Pi 3 B](https://core-electronics.com.au/raspberry-pi-3-model-b.html) and [Pi Zero W](https://core-electronics.com.au/raspberry-pi-zero-w-wireless.html).

I’ll be referring to steps from the [Pimoroni Tutorial](https://learn.pimoroni.com/tutorial/unicorn-hat/getting-started-with-unicorn-hat)

- **Setting up Unicorn Hat** - I’ve had problems running the installer before. The only fix I have for that now is to follow the installation guide on a _fresh_ installation or Raspbian or Raspbian LITE. Using NOOBS is ok too.
- **Verify that Unicorn Hat is installed and working** - Run example scripts from the terminal: Make sure you’re in the examples directory (usually `/home/pi/Pimoroni/unicornhat/examples`), and execute `sudo python simple.py`. Running without `sudo` throws a permissions error and running from the Python interface doesn’t produce a result.
- Note that if only half your display lights up when running `simple.py`, you should edit the line that reads `unicorn.set_layout(unicorn.AUTO)` to read `unicorn.set_layout(unicorn.HAT)`. I’ve found it unecessary to edit this line when running a Rasbpian after installing it with NOOBS. Installations of bare Raspbian by flashing the image to the SD card directly required the line-modification.
