This is my code. It runs fine on Raspberry Pi 4, but it throws an error on Raspberry Pi 5.
The following error occurs when running on Raspberry Pi 5.
Code:
import timefrom rpi_ws281x import Adafruit_NeoPixel, ColorLED_COUNT = 8 LED_PIN = 18 LED_FREQ_HZ = 800000 LED_DMA = 10 LED_BRIGHTNESS = 255 LED_INVERT = False strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS)strip.begin()for i in range(LED_COUNT): strip.setPixelColor(i, Color(255, 0, 0)) strip.show() time.sleep(0.5)for i in range(LED_COUNT): strip.setPixelColor(i, Color(0, 0, 0)) strip.show() time.sleep(0.5)Code:
python3 ./test-ws2812.pyTraceback (most recent call last): File "/home/jw0/./test-ws2812.py", line 13, in <module> strip.begin() File "/home/jw0/python_venv/lib/python3.11/site-packages/rpi_ws281x/rpi_ws281x.py", line 143, in begin raise RuntimeError('ws2811_init failed with code {0} ({1})'.format(resp, str_resp))RuntimeError: ws2811_init failed with code -3 (Hardware revision is not supported)Segmentation faultStatistics: Posted by jieweizero — Mon Jan 29, 2024 2:24 am