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)?

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