# Unicornhathd documentation

**URL:** https://forums.pimoroni.com/t/unicornhathd-documentation/12256
**Category:** Support
**Created:** [November 26, 2019, 10:28pm UTC](https://forums.pimoroni.com/t/unicornhathd-documentation/12256 "2019-11-26T22:28:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ag2000CO](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/ag2000co/32/6159_2.png) [@Ag2000CO](https://forums.pimoroni.com/u/Ag2000CO)
#### Post date: [November 26, 2019, 10:28pm UTC](https://forums.pimoroni.com/t/unicornhathd-documentation/12256/1 "2019-11-26T22:28:33Z")

</div>

Working through some of the examples on github and have more questions than answers with the **ubercorn-rainbow-2x1.py** example. Link is [https://github.com/pimoroni/unicorn-hat-hd/blob/master/examples/ubercorn-rainbow-2x1.py](https://github.com/pimoroni/unicorn-hat-hd/blob/master/examples/ubercorn-rainbow-2x1.py)  
The example controls two 16x16 unicorns side by side

Of course I can’t make the code work (or I wouldn’t be here)  
The documentation I found is [http://docs.pimoroni.com/unicornhathd/#porting-from-unicorn-hat](http://docs.pimoroni.com/unicornhathd/#porting-from-unicorn-hat)  
In the code there are three unicornhathd function used that I can’t find documentation for:

- List item unicornhathd.enable\_addressing()

- List item unicornhathd.setup\_buffer(32, 16)

- List item unicornhathd.setup\_display(0, 0, 0, 0)

If I comment out these lines of code and change the x values to 0-15 the rainbow is displayed. (This example is the rainbow.py example with “rappers”)

Assuming I get the software to work the hardware question remains. If I understand SPI correctly to control 2 unicorns, 2 chip select pins are required. Am I correct that Pi header pins 24 and 26 are used? Pin 24 of course works for one Unicorn.

Other than that I am a happy camper. I have enough ideas for the unicorn that 2 would be nice. Four would be great!  
Update: I found the Raspberry Pi SPI documentation and my pin out assumption is correct:  
The SPI bus is available on the P1 Header:

```auto
MOSI P1-19
MISO P1-21
SCLK P1-23 P1-24 CE0
GND P1-25 P1-26 CE1

```

---

<div class="post-metadata">

### Author: ![Ag2000CO](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/ag2000co/32/6159_2.png) [@Ag2000CO](https://forums.pimoroni.com/u/Ag2000CO)
#### Post date: [November 27, 2019, 8:05pm UTC](https://forums.pimoroni.com/t/unicornhathd-documentation/12256/2 "2019-11-27T20:05:09Z")

</div>

Downloading and digging deep into the github entry for unicorn-hat-hd I found the change log. The top entry is

> Added support for display addressing (for Ubercorn)

when the update is installed maybe documentation will appear.  
Hardware to build for testing.

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Update \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
The instructions to install link back to [https://get.pimoroni.com/unicornhathd](https://get.pimoroni.com/unicornhathd) which does not seem to be the on github

---

<div class="post-metadata">

### Author: ![Ag2000CO](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/ag2000co/32/6159_2.png) [@Ag2000CO](https://forums.pimoroni.com/u/Ag2000CO)
#### Post date: [November 29, 2019, 6:42am UTC](https://forums.pimoroni.com/t/unicornhathd-documentation/12256/3 "2019-11-29T06:42:42Z")

</div>

I have built cabling to connect two unicorn HDs to my Rpi at the same time, one connected to P1-24 CE0 and the other to P1-26 CE1. Both displays work when connected to CE0 and other examples are used. I was hopping that some feedback from the displays would make things work. I still have not had success. Changing parameters, (blindly without documentation) I was able to generate errors that tell me that the functions are part of the library.

In desperation I also ran test using a Rpi4 hopping that there was a Rpi3B+ issue. Still no luck.

Any suggestions, guidance, help will be appreciated. Now that I have the hardware, I’m hooked.

---

<div class="post-metadata">

### Author: ![Ag2000CO](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/ag2000co/32/6159_2.png) [@Ag2000CO](https://forums.pimoroni.com/u/Ag2000CO)
#### Post date: [December 2, 2019, 6:27am UTC](https://forums.pimoroni.com/t/unicornhathd-documentation/12256/4 "2019-12-02T06:27:12Z")

</div>

Have done a total system update. Surprise surprise the latest SD image is not the latest.

 ![Pi_error](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/e/eb689d124cdae98e1ffb4409600d19310242a6d0.png)

Same results with IDE or CLI. Hope that helps.

---

<div class="post-metadata">

### Author: ![Ag2000CO](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/ag2000co/32/6159_2.png) [@Ag2000CO](https://forums.pimoroni.com/u/Ag2000CO)
#### Post date: [December 4, 2019, 11:53pm UTC](https://forums.pimoroni.com/t/unicornhathd-documentation/12256/5 "2019-12-04T23:53:35Z")

</div>

In an effort to be complete (and elicit a response) here is a link to  
[pictures and wiring diagrams](http://knob.com/train_thing/documentation/UnicornHATHD.html)

I got nothing else.
