Queastion about BladeConfig blades

normally i see this on my config file that comes with the saber

};
BladeConfig blades[] = {
 { 0, WS281XBladePtr<116, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), CONFIGARRAY(presets) },
};
#endif

and today i see this

BladeConfig blades[] = {
  { 0, WS281XBladePtr<116, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    WS281XBladePtr<26, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin1> >(),
    WS281XBladePtr<26, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin4> >()
  , CONFIGARRAY(presets) },
};

i usually just use the first one to adjust blade leangth but today when i tried using it in the new hilt i got its telling me to choose a blade setting 1 2 or 3

im not familiar with that, what does the 2nd one actually do

in addition does the ), “0” at the end of a blade style have anything to do with it as well?

TIA

Not sure what you mean by this.
It looks like the seller set you up for having 2 crossguard quillon blades, with 26 pixels each.

The last argument in the preset is the “name” of your preset. Whatever is in quotes will show up on an OLED display, in the Serial Monitor, or in the PorffieOS Workbench webpage.
It can be anything you want, typically the name of the sound font, or a note-to-self like “Luke but Red”. In your case, someone named that preset zero, probably meaning it’s the first one? (zero indexing).

It’s right to include it in the blade st

its a starkiller hilt and the config is the generic 89saber config file…i hav another 89saber config file from another hilt but it doesnt have any of the extra code for the bladeconfig

can i remove yje the W281Xbladeptr<26 lines?

also can i remove the “0” since i dont have an oled?

Depends how the saber is actually wired and what is wired to it.

You can check which blade is which by setting up a preset with these 3 styles.

StylePtr<Red>(),

StylePtr<Green>(),

StylePtr<Blue>(),

It’s possible your hilt side connector uses the other styles, if so they’ll show up, Green, Blue or both. Your main blade should be Red with above styles.

Note the colors will be on full time, so no need to ignite to see what is what.

Ihave this hilt and was using the stock config file to modify and noticed that code

I dont think i need it for this saber that’s why I’m wondering if I can remove it

By the way, I’m still new to all this so I’m still trying to understand what they all mean

The BladeConfig represents what “blades” or LEDs are wired to the board. That can be any light source. You can’t tell what’s wired by looking at the hilt, you’d have to ask the installer or check the blades via my previous reply. A picture of the hilt doesn’t provide any information on the wiring inside.

But it is a cool looking saber! From your config, it does seem that you have 3 blades wired to 3 different pins. It would be a shame not to have that crystal light-up if you remove the wrong blade.

I am about to leave for a family BBQ. When I get back from the BBQ, I can help you figure it out. Just try Fett’s code above ans see what light’s up in witch color.

oh i see ill look into it i just thought having a single blade hilt is an indicator

i think all light is just one source the kyber crystal light is the same as the saber light

Nope, “blades” on Proffieboard are any LED or anything connected to LED pads that need comtrolling. Putting the above styles in a preset will let you see what’s independently wired.

So what was the color when everything lit-up ? You still might want to program the crystal to light up with a different pattern/color than your main blade. If they have been wired in series, then you can program sub-blades and make them light-up differently. However if they have been wired in parallel, then every section will be identical.

You can try the blade length finder:

use StylePtr<LengthFinder<>>(), as your blade style.
Go all the way down to 1, and hopefully only the crystal will light up. However if both the crystal and the first pixel of your blade lights up then they are wired in parallel and they can’t be controlled independently. Maybe that is what you want ? Personally I want my crystal chamber to be able to be controlled independently than the main blade.

If you make it as many pixels as the main blade it will only use the very bottom pixel color to light the blade.
The advantage of that is the crystal would only turn off when the last pixel on the main blade does, so it looks like it’s “retracting” with the blade.

1 Like

It seems like the crystal chamber is a separate led but that would make it two unless the crystal has two leds

I havent tested what fett recommended, for now im leaving it as is as long as the main blade is ok

The crystal chamber is it’s own separate blade in the way side blades are their own separate blade, so you can program it to show whatever color or effect you want.

It still needs to be in the under the main blade style of one of your blade configs though. That means that each blade config needs 2 different StylePtr<
One for the main blade style & one for the crystal chamber.