Unicorn Hat Assistance


#1

Hello all!
I am new to Unicorn and Pi in general. After some time I have managed to put together a damn nice Retropie image and would like to use the Unicorn while I’m playing.

I have managed to run a sample of randon_blinky.py but that is all. I dont know what else to do from there and it seems like there isn’t much information out there for beginners to program the Unicorn. My ultimate goal is to have a “rainbow” that I can control in terms of speed and hue/saturation.

Is there anyone who can point me to, or otherwise educate me in regard to how to code the Unicorn, from start to finish? I can access terminal from my PI, but I have no GUI interface-though I do have a keyboard and a mouse along with Wifi connectivity.

Thanks for the help!


#2

There is this guide here

https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-unicorn-phat

But you will need to change the uh.set_layout(uh.phat) to uh.set_layout(uh.hat) and in the for loops the number 4’s to 8’s but apart from that that guide should be crosss compatible.


#3

This is great! Thanks for sending it to me!


#4

I also penned this guide specifically about how you deal with colour conversion and produce rainbows: https://learn.pimoroni.com/tutorial/unicorn-hat/making-rainbows-with-unicorn-hat