Thanks for that.
It worked perfectly for the python script that just had an os call to the audio file, but when I used the same approach on the script with the neopixel functionality I get the error stating it needs to run in sudo:
Code: Select all
Can't open /dev/mem: Permission denied
Traceback (most recent call last):
File "roger.py", line 8, in <module>
File "/home/pi/Desktop/Roger/led.py", line 12, in led_init
pixels.fill((0, 0, 0))
File "/usr/local/lib/python3.7/dist-packages/neopixel.py", line 214, in fill
File "/usr/local/lib/python3.7/dist-packages/neopixel.py", line 230, in show
File "/usr/local/lib/python3.7/dist-packages/neopixel_write.py", line 24, in neopixel_write
return _neopixel.neopixel_write(gpio, buf)
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/bcm283x/neopixel.py", line 63, in neopixel_write
raise RuntimeError("NeoPixel support requires running with sudo, please try again!")
RuntimeError: NeoPixel support requires running with sudo, please try again!
swig/python detected a memory leak of type 'ws2811_t *', no destructor found.
Its the exact same error as just trying to call the program without sudo.