Illuminated pcb blade config

I have a few questions about the illuminated pcb(npxl v4), I’m prepping for a saber build using the Configuration generator and was wondering why it jumps from 1 blade to 3? does it take two blade styles to run the pcb leds independently? what does style 2 do? and what does style 3 do? do they have to be the same as the main blade style(1)?

1 Like

Looks like it is using SubBladeWithStride to divide the hilt pixels in half. And it is wiring it as option 4 from the NPXL Manual. (and you have to remove one resistor)

Blade one would be the main blade, blade 2 and 3 would be half of the hilt connector 16 leds.

You would need 3 styles listed for each preset in this case.

However, you could wire and set it up differently, if you like. Personally, I usually wire mine like Option 2 from the NPXL Manual.

so blade 2 could be inner ring and 3 outer ring or vice versa, would be interesting to have the bladetyles different to the main blade, one goin clockwise one anti clockwise, i will try figure that out in fetts library

1 Like

This obviously assumes that you have a Shtok’s V3 or V4 PCB. Won’t work on the ECO, and others have different layouts. For example I have some of the initial Shadowfoil Props PCB with 24 pixels where the signal went on the outer and then on the inner circles, so I use SubBlade. Later Shadowfoil have 16leds but I ignore the layout.
Chinese PCBs might use other layouts.

i’ll be using shtoks v4(not eco) cos i want to also add blade detection,

this the blade configuration generated

BladeConfig blades[] = {
 { 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
    SubBladeWithStride(1, 15, 2, NULL)
  , CONFIGARRAY(presets) },
 { NO_BLADE, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
    SubBladeWithStride(1, 15, 2, NULL)
  , CONFIGARRAY(no_blade_presets), "nb_save" }

as of now all ive done is repeat the main blade style. looking to maybe add this to sub blades 2 and 3

//left to right 
 
/* copyright Fett263 Simple (Accent LED / PCB) OS7 Style
https://fett263library.com/early-access/#Simple
OS7.15 v4.11
Single Style
Base Style: Static

Off Behavior: Slow Run Forward [Color: OffColorArg]

Base Color: BaseColorArg (0)

--Effects Included--
Ignition Effect: Instant [Color: IgnitionColorArg]
Retraction Effect: Instant [Color: RetractionColorArg]
Lockup Effect: NoneLightning Block Effect: NoneDrag Effect:
0: accentDragMulti0Shape - Begin: Wipe In - Style: Intensity Sparking Drag - End: Wipe Out
[Color: DragColorArg]
Melt Effect:
0: accentMeltMulti0Shape - Begin: Wipe In - Style: Intensity Melt - End: Wipe Out
[Color: StabColorArg]
*/
StylePtr<Layers<RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,LockupTrL<AlphaL<TransitionEffect<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Int<300>>,TrExtend<4000,TrInstant>,TrFade<4000>,EFFECT_DRAG_BEGIN>,SmoothStep<Scale<TwistAngle<>,IntArg<DRAG_SIZE_ARG,31000>,Int<30000>>,Int<3000>>>,TrWipeIn<200>,TrWipe<200>,SaberBase::LOCKUP_DRAG,Int<1>>,LockupTrL<AlphaL<Stripes<2000,4000,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,Mix<Sin<Int<50>>,Black,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>,Mix<Int<4096>,Black,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>>,SmoothStep<Scale<TwistAngle<>,IntArg<MELT_SIZE_ARG,26000>,Int<30000>>,Int<3000>>>,TrConcat<TrExtend<4000,TrWipeIn<200>>,AlphaL<HumpFlicker<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,RotateColorsX<Int<3000>,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>,100>,SmoothStep<Scale<TwistAngle<>,IntArg<MELT_SIZE_ARG,26000>,Int<30000>>,Int<3000>>>,TrFade<4000>>,TrWipe<200>,SaberBase::LOCKUP_MELT,Int<1>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrWipe<1000>,RgbArg<OFF_COLOR_ARG,Rgb<255,0,0>>,TrWipe<1000>>>>>>(),

//right to left

/* copyright Fett263 Simple (Accent LED / PCB) OS7 Style
https://fett263library.com/early-access/#Simple
OS7.15 v4.11
Single Style
Base Style: Static

Off Behavior: Slow Run Reverse [Color: OffColorArg]

Base Color: BaseColorArg (0)

--Effects Included--
Ignition Effect: Instant [Color: IgnitionColorArg]
Retraction Effect: Instant [Color: RetractionColorArg]
Lockup Effect: NoneLightning Block Effect: NoneDrag Effect:
0: accentDragMulti0Shape - Begin: Wipe In - Style: Intensity Sparking Drag - End: Wipe Out
[Color: DragColorArg]
Melt Effect:
0: accentMeltMulti0Shape - Begin: Wipe In - Style: Intensity Melt - End: Wipe Out
[Color: StabColorArg]
*/
StylePtr<Layers<RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,LockupTrL<AlphaL<TransitionEffect<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Int<300>>,TrExtend<4000,TrInstant>,TrFade<4000>,EFFECT_DRAG_BEGIN>,SmoothStep<Scale<TwistAngle<>,IntArg<DRAG_SIZE_ARG,31000>,Int<30000>>,Int<3000>>>,TrWipeIn<200>,TrWipe<200>,SaberBase::LOCKUP_DRAG,Int<1>>,LockupTrL<AlphaL<Stripes<2000,4000,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,Mix<Sin<Int<50>>,Black,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>,Mix<Int<4096>,Black,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>>,SmoothStep<Scale<TwistAngle<>,IntArg<MELT_SIZE_ARG,26000>,Int<30000>>,Int<3000>>>,TrConcat<TrExtend<4000,TrWipeIn<200>>,AlphaL<HumpFlicker<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,RotateColorsX<Int<3000>,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>,100>,SmoothStep<Scale<TwistAngle<>,IntArg<MELT_SIZE_ARG,26000>,Int<30000>>,Int<3000>>>,TrFade<4000>>,TrWipe<200>,SaberBase::LOCKUP_MELT,Int<1>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrWipeIn<1000>,RgbArg<OFF_COLOR_ARG,Rgb<255,0,0>>,TrWipeIn<1000>>>>>>(),

You could also use this, I haven’t tried it yet but it is from profezzorn’s illuminated pommel (I think it could be really cool on a pcb):

// === NPXL inner ring: ===
StylePtr<MarbleStyle>(),
// === NPXL outer ring: ===
StylePtr<MarbleStyle>(),

And you would need:

#ifdef CONFIG_STYLES
// Marble style from Profezzorn | Use in presets: StylePtr<MarbleStyle>(),
using MarbleStyle = Mix<CircularSectionF<MarbleF<Int<-2000>,Int<40000>,Ifon<Int<827680>,Int<0>>,Int<1276800>>,ChangeSlowly<Ifon<Int<32768>,Int<3276>>,Int<2048>>>,Black,Mix<InOutFuncX<Int<2000>,Int<2000>>,Rgb<0,0,20>,Rgb<0,255,255>>>;
#endif // CONFIG_STYLES

I don’t know yet how to change the direction of the rotation.

It is from this video:

2 Likes

That looks cool I’ll give at a try, thank you

1 Like

Let me know if you figure out how to reverse the rotation.

Use slow or fast run reverse in fett263’s library?

1 Like

I use the NPXL v4 option-4 exclusively (with resistor R1 removed ans Orntar mentioned)–but I only use 1 blade config and style for the emitter–but blade count also needs to include crystal chambers, accent pixels, pixel arrays, and potentially a bluetooth module (if powered by a mfett).

Using the ‘with-stride’ approach for the emitter gives you more options for use with blade-plugs, but is not necessary.

all im looking for really is for it do a funky patten while the saber is idling

1 Like

BaneMK2.h (182.0 KB)
This is what I’ve ended up doing for the config, i am still waiting on the components so i cant even test it,

so will the pcb leds play this bladestyle when i flick the kill switch to on without a blade inserted? then go blank when i ignite the saber

StylePtr<Mix<CircularSectionF</* circle fraction = */ MarbleF<Int<-2000>,Int<40000>,Ifon<Int<827680>,Int<0>>,Int<1276800>>,ChangeSlowly<Ifon<Int<32768>,Int<3276>>,Int<2048>>>,Black,Mix<InOutFuncX<Int<2000>,Int<2000>>,Red,Red>>>(),

then with the blade inserted the pcb leds will be blank?

This style seems to be “on” all the time.

Ok so having blades 2 & 3 in the main presets set to black will still illuminate the pcb leds with said animation even though it’s only set up in the no blade presets?

The style tells the blade what to do.
All the other stuff you mentioned has no impact on that.

all 3 styles per preset just tell the blade what to do?

One style - one blade.
First style tells blade one what to do.
Second style tells blade two what to do.
Third style tells blade three what to do.

There is no cross-talk, the first style has no impact on blade two and three, etc.

What I’m not getting is how the pcb leds style animation will be on all the time if it’s only set up in the no blade config array

Maybe I should be more clear; by “all the time” I mean “when this preset is active”.

If you switch to a different preset, or a different preset array, then this style will not be in control of the blade.

I was trying to express that it doesn’t turn on and off when the saber is ignited/retracted. Not that the style is in control of the blade unconditionally.

Here are some of my premade blade styles for the NPXL V3-V4 connectors:

Also this link is available on my website page “Downloads” section:

1 Like