You know when some people say they get their best ideas sitting on the

You know when some people say they get their best ideas sitting on the can or in the shower? For me it’s the latter … so this morning I thought, rather than creating a custom test string of 48 pixels, why not take two stock strings side by side and stagger them. It would mean looping through the array while jumping back and forth between the two, but it’s doable. Basically the array gets broken down into:

array[0] -> string1[0]
array[1] -> string2[0]
array[2] -> string1[1]
array[3] -> string2[1]
etc., etc.

As opposed to the one to one translation now where the index of the array is also the index of the string. I’ll probably try that this evening and see how it works out.

Weird, the comment I posted didn’t show up. Stupid mobile clients.

Anyway - I’m thinking about making a wrapper class that works like an array, but behind the scenes does a very fast mapping between what you want the array to look like and what the actual array/string mappings here.

The modes that i’m thinking of are:

  • 2-D matrix (both normal x/y ordering and a zig zag ordering, which those 16x16 sheets of ws2811s i have do)
  • segment re-ordering
  • reverse ordering of arbitrary segments

you’ve added to the ideas for that to also include things like staggered interleaving and more

Many of my project ideas will benefit from this.

Except … you have a looming July 4th. ’ Nuf said. :slight_smile:

Yes, except that project will need, at least the beginnings, of a mapper like this :slight_smile:

FWIW, The Lightning Tree project that I did has the “tree trunk” pixels in backward order: 0 is at the top of the trunk, with pixels spiraling down to #70 at the bottom. Pixels #71-299 are then up on the branches. So I have an use case already we can test on. Previously, I just used an asm routine to reverse the bottom 70 pixels just before show() if I wanted to do that, but there are better options.