respeaker / pixel_ring

RGB LED library for ReSpeaker 4 Mic Array, ReSpeaker V2 & ReSpeaker USB 6+1 Mic Array
60 stars 41 forks source link

Change color #5

Open hpposch opened 5 years ago

hpposch commented 5 years ago

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 :)

xiongyihui commented 5 years ago

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

hpposch commented 5 years ago

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?

HinTak commented 4 years ago

No, it would change it to reddish purple.

HinTak commented 3 years ago

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.