Closed adamsr1 closed 2 years ago
Hi there, for help with running Python, please post to user forums. For example, if its a Raspberry Pi - there's forums at https://forums.raspberrypi.com/ - if its a product purchased from adafruit, there's forums.adafruit.com/ - etc!
I am trying to code a Neopixel x24 RGBW ring on a Pi 4b. Loaded the libraries and the force reinstall in sudo. Wrote in the recommended test code from Adafruit but when I try to run it I get the following errors:
Can't open /dev/mem: Permission denied Traceback (most recent call last): File "/home/pi/Desktop/light ring.py", line 37, in
pixels.fill((255,0,0,0))
File "/usr/local/lib/python3.7/dist-packages/adafruit_pixelbuf.py", line 216, in fill
self.show()
File "/usr/local/lib/python3.7/dist-packages/adafruit_pixelbuf.py", line 204, in show
return self._transmit(self._post_brightness_buffer)
File "/usr/local/lib/python3.7/dist-packages/neopixel.py", line 180, in _transmit
neopixel_write(self.pin, buffer)
File "/usr/local/lib/python3.7/dist-packages/neopixel_write.py", line 38, in neopixel_write
return _neopixel.neopixel_write(gpio, buf)
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/bcm283x/neopixel.py", line 79, in neopixel_write
"NeoPixel support requires running with sudo, please try again!"
RuntimeError: NeoPixel support requires running with sudo, please try again!
Please help.