Subblade for single pixel at END of strip

Hello and greetings all- Had a question about setting up a strip with a separate subblade assigned pixel at the END of the strip. I am used to doing subblades for the first pixel for crystal chambers etc, but this build in particular is a blaster. At the end of the barrel is a single neo. My assumption was that the BladeConfig would read as such:

BladeConfig blades = {
{ 0,
SubBlade(0, 17, WS281XBladePtr<18, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
SubBlade(18, 18, NULL),
CONFIGARRAY(presets) },
};

But wanted a sanity check. Thanks for looking!

This would need to be 19, if your SubBlade() invocations are correct.
Other than that it seems fine.

Not quite.
You have 18 pixels, and you have correctly noted that the address of the first one is zero. That means the address of the last one is 17, not 18. Hence you need:

BladeConfig blades = {
{ 0,
SubBlade(0, 16, WS281XBladePtr<18, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
SubBlade(17, 17, NULL),
CONFIGARRAY(presets) },
};

:slight_smile:

This was a huge help thanks to you both

1 Like