rpi-ws281x / rpi-ws281x-python

Python library wrapping for the rpi-ws281x library
BSD 2-Clause "Simplified" License
319 stars 102 forks source link

Led order is not correct #65

Closed Juhishub closed 1 year ago

Juhishub commented 3 years ago

Currently there is no way (I think so) to change the led order. The led order of a led strip could be RGB, GRB, BRG etc. I just faced this issue, the code was working perfectly but my new strip is not RGB, its BRG so the colors are not correct. If there is a way to change the order, let me know! Thanks.

cp2004 commented 3 years ago

In this file, you can see there are all the different types of LED strip.

https://www.github.com/pimoroni/rpi_ws281x/tree/master/ws2811.h

You can import these and pass them as parameters to the PixelStrip class.

Example

https://github.com/cp2004/OctoPrint-WS281x_LED_Status/blob/877869973167acd6cd413f6ff45a4d57f4ce4df3/octoprint_ws281x_led_status/constants.py#L48-L63