Hey. My name is Hendrik and I am just getting into Arduino and fastLED. I got myself some APA102 LED Strips to use in an interactive art installation that uses 4 Strips (controlled individually). I was wondering if I can connect all 4 clock signals to only one output on the arduino to have more free inputs/outputs
My understanding is that each strip will need its own pin if you want individual control. But I think you can also wire all 4 strips as one and send separate instructions to “sets” of LEDS. For example, if you have four strips of 50 wired as 200, you can have LEDs 0-49 turn red, 50-99 blink, 100-149 turn blue, and 150-199 turn off and on one at a time. But I think this setup would slow things down quite a bit.
However, there are far smarter and more experienced people in this group that can give you a better answer.
With the APA102 you can - because of a nice little quirk in the data programming. The way the clock/data pairing works is when ever the clock line toggles, the chip reads the value on the data line, and it does this for each bit that’s sent down the line.
If you have one clock line that’s shared with 4 data lines for four strips, as data is being written out, one strip will be reading led data that’s being sent while the other strips will be reading 0’s (because their data lines will be kept low while the other strip’s data is being written out).
APA102 expects the start of a frame to begin with a 1-bit - so, the other lines will effectively ignore the clock during that time.
I write up how to use this trick to drive four lines of APA102 leds off of the teensy 3.x and using hardware SPI for all four lines - https://github.com/FastLED/FastLED/wiki/SPI-Hardware-or-Bit-banging#getting-four-hardware-spi-lines-for-the-apa102-out-of-the-teensy-3031
You can do something similar in other environments if you want to save pins, however, be aware that in most of those environments (with the exception of the rfduino and lpc8xx (when FastLED support for that gets merged back in to the library) - where I can move the hardware SPI interface to any pair of pins I want you’ll be bitbanging your SPI output, which will slow things down.