The simplest possible program:
import unicornhat as uh
crashes with a segfault:
root@h2opi31:/home/Display# python D.py
Segmentation fault
As do the example programs (that terminate):
root@h2opi31:~/Pimoroni/unicornhat/examples# python detect.py
DetectNote: Your Unicorn HAT must be plugged in before boot to detect properly!
Trying to detect if you have a Unicorn HAT or Unicorn pHAT
Autodetection finished, let’s see the result…Your height is NOT equal to your width, so you must have a pHAT.
If your hardware has been properly detected, it should be safe to use the following in your code:
unicorn.set_layout(unicorn.AUTO)Otherwise use one of the following in our code:
unicorn.set_layout(unicorn.PHAT)
unicorn.set_layout(unicorn.HAT)Segmentation fault
root@h2opi31:~/Pimoroni/unicornhat/examples#
Do I have out-of-date drivers or something? I just built a Raspberry Pi Zero W with a Unicorn pHAT and installed Raspian Lite using NOOBS Lite, so I’m running Raspbian GNU/Linux 9 (stretch).
I had to modify the install script because I’m running as the root user, but it seems to work, all the demos work, and my code works, but I get a segfault on program termination, and that just doesn’t feel right…
Am I doing something wrong?
Thanks!