TobKra96 / music_led_strip_control

Audio visualization for LED strips in real-time with web interface on a raspberry pi.
https://tobkra96.github.io/music_led_strip_control/
MIT License
297 stars 64 forks source link

Add SPI support #150

Closed 42Willow closed 1 year ago

42Willow commented 2 years ago

I am new to most of this but it seems that https://github.com/jgarff/rpi_ws281x now has SPI support. According to https://forums.raspberrypi.com/viewtopic.php?t=201516 this means you can play music and use the lights at the same time. At the moment on the device settings page it says:

The GPIO Pin used for the signal. Not all pins are compatible. Use GPIO 18 (pin 12) for PWM0 and GPIO 13 (pin 33) for PWM1. Default setting: 18

Please correct me if I'm wrong about any of the above.

EDIT: I have tested this, it is definitely do-able I managed to get the RPI to play music and flicker a neopixel at the same time. 😄

TobKra96 commented 2 years ago

Hi, as far as I know, you can do it by changing the GPIO port in the the settings to one, which is using spi:

    SPI0-MOSI is available on GPIOs 10 and 38.
    Only GPIO 10 is available on all models.
    See also note for RPi 3 below.

Additionally, you have to set the following settings in the os: https://github.com/jgarff/rpi_ws281x#spi