The following is from my RPi2B (or not 2B) with the latest Raspberry Pi OS (11 Jan '21):
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import unicornhat as uh
Can't open /dev/mem: Permission denied
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/dist-packages/unicornhat.py", line 35, in
ws2812.begin()
File "/usr/local/lib/python3.7/dist-packages/rpi_ws281x/rpi_ws281x.py", line 131, in begin
raise RuntimeError('ws2811_init failed with code {0} ({1})'.format(resp, str_resp))
RuntimeError: ws2811_init failed with code -5 (mmap() failed)
This message occurs on other RPi regardless of using the 'wget' Bash script
or 'git clone' from here.
ls -l /dev/mem
crw-r----- 1 root kmem 1, 1 Jan 20 17:46 /dev/mem
Maybe this is more of an issue with the rpi_ws281x package?
The following is from my RPi2B (or not 2B) with the latest Raspberry Pi OS (11 Jan '21):
Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
This message occurs on other RPi regardless of using the 'wget' Bash script or 'git clone' from here.
ls -l /dev/mem crw-r----- 1 root kmem 1, 1 Jan 20 17:46 /dev/mem
Maybe this is more of an issue with the rpi_ws281x package?