Subblades control

So I know how to control “subblade” pixels in the strip pixel chain when we choose an array of pixels without “gaps” (say from 1 to 16, then from 17 to 20 etc.). But is it possible to choose specific pixels # for a subblade array? Say I want to control only 1, 3, 5, 7, 9, 11, 13, 15 as 1 array. That would be awesome to use with my currently released NPXL V3 blade connectors that have 16 pixels now all connected in a chain to be able to set different blade styles for inner circle of pixels and outer circle using subblades:

You’re in luck, because this is exactly what SubBladeWithStride does:

2 Likes

AWESOME! But it just skips 1 pixel between them right? But is it possible to set any # of pixel for the array? Say 1, 5, 6, 7, 3, 19 ?

1 Like

Not currently. The “stride” is a single value for how many to skip. It’s a constant.
Why would you need to do that though? Technically, you could make every pixel it’s own blade. Not realistic in practice, but possible.
SubBlade 1, skip2, 3
SubBlade 5,6,7
SubBlade 19

Just for options :slight_smile:

Using patterns (like stride) is a lot more efficient than supporting arbitrary sets. I can add arbitrary sets if we really need it I suppose, but I kind of hope that we don’t.

1 Like

@profezzorn is it possible to update stride to allow a skip, but then pickup a set of pixels. The pixel set below is an example. Say I want sets like this {1,6, 7, 12}, {3, 4, 9, 10}.
1 2 3
6 5 4
7 8 9
12 11 10

Yes, but not without coding.
Basically you would need to make your own subblade variant that takes an array of integers so you can specify exactly which LEDs you want.

On the Github feature request I posted I do not see any update if this got included into OS7 alpha/beta. Can you provide an update on status?

I can do testing of the new subbladeZZ if needed as I have the hardware PCB and a test board already setup.

There is no update, because I have not worked on implementing this yet.
I’ve been meaning to review the github issues and other todo items, but I haven’t had the time with being on vacation Australia and all. However, I’m back now, so I will see if I can have a go at it.

1 Like

Sorry for the thread necromancing (again). But this question is so pertinent to this thread I think it should be included:

I use Shtok’s Illuminated PCBs. And he has two concentric “circles” of leds wired as the first post. So it is a great option for doing SubBladeWithStride so I can handle it as two concentric blades. BUT, I also want to use just one Data line, and thus I would like to use the rest of the Blade as a subblade. You currently can’t mix and match SubBlade and SubBladeWithStride, right?

You can totally mix-and-match all the various SubBlade functions.

So I could do:

	//Illuminated PCB is 16 pixels in two interleaved circles
	// 22.3k is an 86.5cm 124 pixel WS2812, SMD resistor
	// Total pixels: 140, range 0-139
	{ 22300,
		SubBladeWithStride(0, 15, 2, WS281XBlade<109, bladePin, Color8::GRB>()), , PowerPINS<bladePowerPin2, bladePowerPin3> >()),
		SubBladeWithStride(1, 15, 2, NULL),
		SubBlade(16, 139, NULL),
	},

Yes you can.

1 Like