When I import the unicornhat module, I receive the following error message:
Traceback (most recent call last):
File “/home/pi/test.py”, line 2, in
import unicornhat as uh
File “/usr/local/lib/python3.5/dist-packages/unicornhat.py”, line 35, in
ws2812.begin()
File “/usr/local/lib/python3.5/dist-packages/rpi_ws281x/rpi_ws281x.py”, line 130, in begin
raise RuntimeError(‘ws2811_init failed with code {0} ({1})’.format(resp, str_resp))
RuntimeError: ws2811_init failed with code -5 (mmap() failed)
I have tried this on multiple raspberry pi 3 b cards and get the same behavior. I am using stretch raspbian. I installed by running and saying yes to everything (including audio and full install):
curl https://get.pimoroni.com/unicornhat | bash
I have commented out these lines in my config.txt:
hdmi_force_hotplug=1
dtparam=audio=on
in the hopes that something audio-related was causing the issue. When I place the hat on my rpi I don’t see any lights by default. Is that expected? I have pushed the hat down pretty far, but you can see a little bit of the GPIO pins, should it be all the way down?
Thanks for the help.