So you got a second saber, and it has more LEDs than your first one? Maybe it has a crystal chamber, or an illuminated pogo pin PCB. So now you want to take your existing configuration file and add another blade for the extra LEDs. You've come to the right place.
We'll need to do four things:
If you have KEEP_SAVEFILES_WHEN_PROGRAMMING in your config file, you need to remove it, because it's not going to work when you add another blade.
Simple, just change:
#define NUM_BLADES 1
to:
#define NUM_BLADES 2
This is a little trickier. Your blades array may look like this:
BladeConfig blades[] = {
{ 0, WS281XBladePtr<132, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), CONFIGARRAY(presets) },
};
Now, let's say we have a crystal chamber with two LEDs, once we add the second blade, it might look like this:
BladeConfig blades[] = {
{ 0,
WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<2, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin6> >(),
CONFIGARRAY(presets) },
};
This assumes that the data for your crystal chamber comes from LED4, and the (-) pad is hooked up to LED6. If that's not the case, you'll need to modify this example accordingly. You can also use the configuration generator to generate blades arrays which might look more like your specific setup to make it easier.
The style will determine the color for your new LEDs, and obviously, you can use anything you want, but for simplicity, I'm going to show three easy options to get you started:
So if your preset looks like this:
{ "TeensySF", "tracks/venus.wav",
StyleNormalPtr<CYAN, WHITE, 300, 800>(),
"cyan"},
Then you just copy the style, and the comma after it, like so:
{ "TeensySF", "tracks/venus.wav",
StyleNormalPtr<CYAN, WHITE, 300, 800>(),
StyleNormalPtr<CYAN, WHITE, 300, 800>(),
"cyan"},
Now the new LEDs will behave exactly like the main blade. That might not be what you actually want, but it's always a good idea to keep it simple first and make one more change at a time.
You can use the style generator, take a style posted somewhere, or one that came with a sound font. You just insert the new style after the old one, exactly like we did above, the result might look like:
{ "TeensySF", "tracks/venus.wav",
StyleNormalPtr<CYAN, WHITE, 300, 800>(),
StylePtr<SimpleClash<Lockup<Blast<Cylon<Rgb<0,0,64>,15,10, DeepSkyBlue,15,100,2000,Cylon<Rgb<64,0,0>,15,6, Red,15,57,2000,Cylon<Rgb<0,40,0>,15,7, Green,15,37,2000>>>,White>,AudioFlicker<Blue,White>>,White>>(),
"cyan"},
This is just an example of course, the style you use might be much shorter. (Or, in some cases, much longer.)
This can be nice for some presets that don't need the extra bling. In this case we simply set the new style to black, like so:
{ "TeensySF", "tracks/venus.wav",
StyleNormalPtr<CYAN, WHITE, 300, 800>(),
StylePtr<Black>(),
"cyan"},
Now, please note that you may have a charging style that looks something like this:
{ "TeensySF", "tracks/mars.wav",
&style_charging,
"Battery\nLevel"}
Note that "&style_charging" is a style, even if it looks different from most other styles. All the options above apply the same. Here is what it would look like if make the crystal chamber off/black while charging.
{ "TeensySF", "tracks/mars.wav",
&style_charging,
StylePtr<Black>(),
"Battery\nLevel"}
Ok, so there you go. Save the config file and upload your new configuration.