Unicorn HAT HD

Hi All, very new here, bought the Unicorn HAT HD, for a Pi Zero W.

Installed as per instructions, but every example errors:

Unicorn HAT HD: Candle

This example simulates a flickering candle flame.

Press Ctrl+C to exit!

Traceback (most recent call last):
File “./candle.py”, line 102, in
unicornhathd.show()
File “/usr/lib/python2.7/dist-packages/unicornhathd/init.py”, line 139, in show
setup()
File “/usr/lib/python2.7/dist-packages/unicornhathd/init.py”, line 44, in setup
_spi.open(0, 0)
IOError: [Errno 2] No such file or directory

My SPI interface is on :
cat /boot/config.txt | grep spi

dtparam=spi=on

Limited knowledge means now I’m stumped!

Any ideas?

Are you running it as Super User (SUDO)?

What do you see if you: ls /dev/spi*

And also lsmod

Hi All

Brief update, and thanks for the questions.

Firstly yes I was trying as root

Secondly I saw nothing with ls /dev/spi*, however the Pi config had it loading on boot, and it was rebooted.

I did try pretty much everything, but could not see the SPI device.

So I downloaded the raspberry image and completely blew my image away, and re-installed from scratch…

Voila the spi devices appeared and code worked and the screen lit up like an xmas tree!!

Great Stuff

And thanks for replying!

Wayne

Thanks for dropping by and letting us know you’re up and running! Happy hacking!