Alternate Color Patterns

Hi all - I have been reviewing all of the code associated with the Alexa and Google Home color patterns and trying to figure out the dang logic behind the patterns. I want to create a new pattern specific to my project with specific colors and sweeping patterns but the code is overwhelming to me.

for examples see: <LINK_TEXT text=“ …”></LINK_TEXT>

Does anyone know a simpler method to call the LED’s, set the colors, and set the timing?



HI Stephan,

please use below code. thanks.

import time

from pixel_ring import pixel_ring
from gpiozero import LED

power = LED(5)



Thanks for this, but it fails because I don’t seem to have the respeaker.usb_hid installed properly?

Hi Stephan,

  1. do you use the 4 mics pi hat?

  2. what kinds of error do you have?

  3. do you open the spi interface as below?

    sudo raspi-config

    Go to “Interfacing Options”

    Go to “SPI”

    Enable SPI

    Exit the tool

  4. we use the pixel library from <LINK_TEXT text=“ … pixel_ring”></LINK_TEXT> thanks.

Thanks for the above, but I searched around and was able to reinstall usb_hid and it now works.

I now just need to figure out how to do patterns. The above code seems to turn them all on or all off. That is a start.