Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Which SPI pins to use?
I have a raspberry pi which I've connected to a 150 RGB LED strip and I managed to get lights to turn on and off using pigpio which was wonderful and quite satisfying. I followed this tutorial which basically says put this pin here, put that pin there, etc .. so it was pretty hard to go wrong.

Now I'd really like to use BiblioPixel since I've proved the concept and would like to go to the next level but I'm struggling to work out where the pins should plug on the SPI bus. The documentation says use pins 19 (MOSI) for Data and 23 (SCLK) for Clock. But using my existing wiring I have 4 cables in the SPI - ground, R G and B. The strip itself has 4 pins and which are labelled R, G, B and 12V. So I am confused. Is there a wiring diagram for dummies I could take a peek at?

Sorry for the newbie question.
Sorry for the bad news... but you do not have an SPI LED strip. What you have is what we call an "Analog Strip". The type where the whole strip is *always* the same color. BiblioPixel is for *Digital* LED strips, where each LED has a driver IC... we communicate with those drivers over SPI (or other protocols in some cases).

The wires on your cable are Ground, Red 12V, Green 12V, and Blue 12V. DON'T HOOK THAT DIRECTLY TO A PI!!! You will fry it hard!

And the tutorial you linked to is not using SPI in any way... it's using PWM capable pins to drive MOSFETs, which drive the LED strip.

So, right now... we don't support what you are trying to do. But stay tuned... we have a product coming for turning that analog strip you have into one that's digitally controllable.
Yep thanks for the reply, I had come to the same conclusion about an hour after posting the question yesterday! I'll return it and buy an addressable one. Cheers ...
Hey there...

I now have a ws2812 addressable strip Smile and I'm back on the "which gpio pin" question, the wiring diagram has connections for data and clock, but I only have data, no clock, am I just using pin 19 or something else? Sorry for the newbie questions.
Oh no... I sincerely apologize that I realize now I left one important detail out Sad We support digital strips that support SPI when connecting directly to the Raspberry Pi. The WS2812 is, unfortunately, *not* one of them as it is not an SPI strip. It uses a 1-wire protocol that is not compatible with the Pi... at least not with BiblioPixel. There is technically some C code that works with it, but we don't not have support baked into BiblioPixel for that code. The strips that are supported directly on the Pi are APA102, LPD8806, and WS2801. For strips like the WS2812, you need to use something like our AllPixel USB controller which acts as a translator.

Forum Jump:

Users browsing this thread: 1 Guest(s)