pixel_ring icon indicating copy to clipboard operation
pixel_ring copied to clipboard

Change color

Open hpposch opened this issue 6 years ago • 4 comments

Hello, can i change the color of the patterns? for example when i call pixel_ring.think() i want the leds in green and not in blue.. where can i do this?

Thanks in advance :)

hpposch avatar Jan 30 '19 13:01 hpposch

You can modify the file https://github.com/respeaker/pixel_ring/blob/master/pixel_ring/pattern.py

xiongyihui avatar Feb 11 '19 05:02 xiongyihui

Ok i already thought about this.. So for example: def listen(self): pixels = [0, 255, 0, self.brightness] * self.pixels_number

    self.show(pixels)

Would this change the think action to green?

hpposch avatar Feb 11 '19 06:02 hpposch

No, it would change it to reddish purple.

HinTak avatar Mar 15 '20 21:03 HinTak

It is not documented, but the 4 numbers are [not-used, red, green, blue] , as far as I know. I actually got a spinning rainbow working, so I think I am correct.

HinTak avatar Dec 03 '20 20:12 HinTak