Super beginner request for help! I want to achieve 2X LED density in a POV project I’m building for my son. I sized everything out and two 2020 LED strips adjacent to one another, offset by one LED-width fit perfectly with no overlap. It’s doable!
I have successfully built one POV baton using Mortonkopf’s build log and code (code linked below), but my just-starting-out programming skills have no hope of modifying the POV function to address the image array data to two separate, offset, alternating-as-you-ascend LED strips.
If this is the kind of thing that can be reasonably accomplished with some elegant (or hack-ish) code, I would really appreciate the help!
If I understand correctly, you have two strips arranged side by side like this:
0_1_2_3_4…
_0_1_2_3_4…
And you want the data sent to them like this:
0_2_4_6_8…
_1_3_5_7_9…
If you code as if you had a single strip of double length, NUM_LEDS x 2, then you can call a subroutine right before calling FastLED.show() that copies and shuffles the pixels into the correct final display ordering.
Correct - that’s a much simpler way of putting the problem!
When you refer to NUM_LEDS x 2 are you saying to use the sum of the LEDs on both strips as my NUM_LEDS figure? (That makes sense.)
Can you point me to an example or two I can draw from regarding the subroutine that copies and shuffles the pixels into the correct final display ordering? I’m not quite sure where to begin on that. (I was just reading about CRGBArray and CRGBSet. Will those be applicable here?)
The good news: I built a small test setup, with offset adjacent rows of 8 LEDs each. I incorporated your code into the POV sketch I had been using and it worked!
The bad news: I tried scaling it up to 300 image “slices” and two adjacent rows of 98 LEDs each. Result: Arduino IDE wouldn’t compile my sketch, returning “out of scope” errors for the PoiSonic and ShufflePixels functions. I do have a pretty neat setup, though, of 198 APA102 2020 LEDs crammed into ~20".
Any idea what’s going on with the compile errors? I tried loading the sketch on a Teensy 3.2, and I have plenty of other boards available.
Oh wow that’s a long line, haha.
I didn’t get the error you got, but rather a “not declared in this scope” error. So I reordered a few things and then it compiled for me on a Teensy 3.2 After line 31, I first put the ShufflePixels function, then the PoiSonic function, and then put the main void loop at the very bottom.