Help with Blade configuration (Morphed to Another Issue)

Hello all, Im looking for some assistance with an interesting blade configuration I have.

Here’s the Hardware and Data path:

I have two Neopixel data paths.

1- Proffieboards LED2+3 – to – Neopixel Switch (1Neopixel) – to – Accent Neopixel (Small Crystal Chamber, 1 Neopixel) – Shtokv3 (16 Leds) – to – blade (All in series, with appropriate resistors)
2-Proffieboards LED4+5 – to – shtokv3 (Large Crystal chamber) (All in Series)

This is the configuration that I have going (Which is wrong, Ive tried several different ways, and I cant find a good example of mixing both sub-blades and non-sub blades together):

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 4
#define NUM_BUTTONS 1
#define VOLUME 1800
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 4.5
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define ENABLE_SERIAL
#define ENABLE_ALL_EDIT_OPTIONS
#define FETT263_EDIT_MODE_MENU
#define DISABLE_BASIC_PARSER_STYLES
#define KEEP_SAVEFILES_WHEN_PROGRAMMING
#define COLOR_CHANGE_DIRECT
#define COLORWHEEL_ZOOM
#define DISABLE_DIAGNOSTIC_COMMANDS
#define FETT263_DUAL_MODE_SOUND
#define FETT263_LOCKUP_DELAY 200
#define FETT263_SWING_ON
#define FETT263_SWING_ON_NO_BM
#define FETT263_SWING_ON_SPEED 300
#define FETT263_TWIST_OFF
#define FETT263_TWIST_ON
#define FETT263_TWIST_ON_NO_BM
#define FETT263_THRUST_ON
#define FETT263_THRUST_ON_NO_BM
#define FETT263_SAVE_GESTURE_OFF
#define FETT263_FORCE_PUSH
#define FETT263_SAY_BATTERY_PERCENT
#define FETT263_MULTI_PHASE
#define FETT263_FORCE_PUSH
#define FETT263_FORCE_PUSH_LENGTH 5
#define NO_REPEAT_RANDOM
#define SAVE_STATE
#define MOTION_TIMEOUT 60 * 5 * 1000
#define FETT263_MOTION_WAKE_POWER_BUTTON
#define IDLE_OFF_TIME 60 * 5 * 1000
#endif


#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#include "../sound/sound_library.h"
#endif


#ifdef CONFIG_PRESETS
Preset presets[] = {
{ "KrossGuard;common", "tracks/TFA_Battle.wav",	StylePtr<Layers<Mix<HoldPeakF<IncrementWithReset<Sum<EffectPulseF<EFFECT_CLASH>,EffectPulseF<EFFECT_LOCKUP_BEGIN>>,ThresholdPulseF<IncrementWithReset<ThresholdPulseF<BlinkingF<Int<1000>,Int<500>>,Int<32000>>,Sum<EffectPulseF<EFFECT_CLASH>,EffectPulseF<EFFECT_LOCKUP_BEGIN>,ThresholdPulseF<SwingSpeed<400>,Int<18000>>>,Int<32768>,Int<8000>>,Int<32000>>,Int<32768>,Scale<ClashImpactF<>,Int<2000>,Int<8000>>>,Int<3000>,Int<10000>>,Mix<HoldPeakF<SwingSpeed<250>,Scale<SwingAcceleration<100>,Int<50>,Int<500>>,Scale<SwingAcceleration<>,Int<20000>,Int<10000>>>,RandomFlicker<StripesX<Int<15000>,Scale<HoldPeakF<SwingSpeed<200>,Scale<SwingAcceleration<100>,Int<50>,Int<300>>,Scale<SwingAcceleration<100>,Int<24000>,Int<16000>>>,Int<-3200>,Int<-200>>,RgbArg<BASE_COLOR_ARG,Rgb<0,255,255>>,RgbArg<BASE_COLOR_ARG,Rgb<0,255,255>>,Mix<Int<7710>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,255,255>>>,RgbArg<BASE_COLOR_ARG,Rgb<0,255,255>>,Mix<Int<19276>,Black,RgbArg<BASE_COLOR_ARG,Rgb<0,255,255>>>>,RgbArg<BASE_COLOR_ARG,Rgb<0,255,255>>>,RgbArg<BASE_COLOR_ARG,Rgb<0,255,255>>>,StaticFire<BrownNoiseFlicker<RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>,RandomPerLEDFlicker<Mix<Int<3213>,Black,RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>>,Mix<Int<7710>,Black,RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>>>,300>,Mix<Int<10280>,Black,RgbArg<ALT_COLOR_ARG,Rgb<255,0,0>>>,0,6,10,1000,2>>,TransitionEffectL<TrConcat<TrJoin<TrDelayX<WavLen<>>,TrWipeIn<200>>,AlphaL<RgbArg<STAB_COLOR_ARG,Rgb<255,97,0>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<2000>>>,TrWipe<200>>,EFFECT_STAB>,MultiTransitionEffectL<TrWaveX<RgbArg<BLAST_COLOR_ARG,Rgb<255,244,157>>,Scale<EffectRandomF<EFFECT_BLAST>,Int<100>,Int<400>>,Int<100>,Scale<EffectRandomF<EFFECT_BLAST>,Int<100>,Int<400>>,Scale<EffectRandomF<EFFECT_BLAST>,Int<28000>,Int<8000>>>,EFFECT_BLAST>,TransitionEffectL<TrWaveX<RgbArg<CLASH_COLOR_ARG,Rgb<255,244,157>>,Scale<ClashImpactF<>,Int<100>,Int<400>>,Int<100>,Scale<ClashImpactF<>,Int<100>,Int<400>>,Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>>,EFFECT_CLASH>,LockupTrL<AlphaMixL<Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AudioFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,244,157>>>,BrownNoiseFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,244,157>>,Int<200>>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,244,157>>,TrFade<400>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,244,157>>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<RgbArg<LB_COLOR_ARG,Rgb<255,244,157>>,AudioFlicker<RgbArg<LB_COLOR_ARG,Rgb<255,244,157>>,Blue>,50,1>,TrConcat<TrInstant,AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,244,157>>,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,244,157>>,Int<16000>>,30>,TrSmoothFade<600>>>,LockupTrL<AlphaL<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,244,157>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrConcat<TrJoin<TrDelay<4000>,TrWipeIn<200>>,AlphaL<BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,244,157>>,Int<300>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrFade<4000>>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Remap<Scale<RampF,Int<65536>,Int<0>>,StaticFire<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>,Mix<TwistAngle<>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>,RotateColorsX<Int<3000>,Mix<Int<12000>,Black,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>>,0,3,5,3000,10>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrConcat<TrWipeIn<100>,AlphaL<RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrJoin<TrDelay<4000>,TrFade<300>>,AlphaL<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrFade<4000>>,TrWipe<200>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipeX<IgnitionTime<300>>,TrWipeInX<RetractionTime<0>>,Black>,TransitionEffectL<TrConcat<TrInstant,AlphaL<BrownNoiseFlickerL<RgbArg<PREON_COLOR_ARG,Rgb<0,255,255>>,Int<30>>,SmoothStep<Scale<SlowNoise<Int<2000>>,IntArg<PREON_SIZE_ARG,2000>,Sum<IntArg<PREON_SIZE_ARG,2000>,Int<4000>>>,Int<-2000>>>,TrDelayX<WavLen<EFFECT_PREON>>>,EFFECT_PREON>,TransitionEffectL<TrConcat<TrJoin<TrDelay<2000>,TrWipe<1000>>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrWipeIn<1000>>,EFFECT_BATTERY_LEVEL>>>(),
StylePtr<Layers<RotateColorsX<Saw<Int<5>>,Red>,InOutTrL<TrInstant,TrInstant,RgbArg<BASE_COLOR_ARG,Rgb<255,255,0>>>>>(),
StylePtr<Layers<RotateColorsX<Saw<Int<5>>,Red>,InOutTrL<TrInstant,TrInstant,RgbArg<BASE_COLOR_ARG,Rgb<255,255,0>>>>>(),
StylePtr<Layers<RotateColorsX<Saw<Int<5>>,Red>,InOutTrL<TrInstant,TrInstant,RgbArg<BASE_COLOR_ARG,Rgb<255,255,0>>>>>(), "Kylo Ren"},
};

BladeConfig blades[] = {
{ 0,
  SubBlade(3, 132, WS281XBladePtr<132, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  SubBlade(0, 0, NULL),
SubBlade(1, 2, NULL)},
{1, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin5> >(), 
}
};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif

Its just one style for testing. Again I know its not right, It does pass and allow me to upload it, but gives me a Blade array error through the speaker when booting it up.

Any help would be appreciated!

1 Like

Numbering starts at 0 so if you have 132 pixels they would be numbered 0 ~ 131.

1 Like

OK yeah that was a rookie mistake, Ive fixed that, but still getting an error in blade array when booting:

BladeConfig blades[] = {
{ 0,
  SubBlade(3, 131, WS281XBladePtr<132, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  SubBlade(1, 2, NULL),
  SubBlade(0, 0, NULL)},
{1, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin5> >(), 
}
};
#endif
1 Like

The 4th blade shouldn’t be broken out like that, have it after the SubBlades.

You’re going to need 4 styles per preset as well.

1 Like

Fixed the Broken out blade array, and that solved it. Thank you. Already have 4 blade styles each. I wanted each bit to do something a bit different. Thanks for all your help.

2 Likes

Well Everything worked with blades, but I have a totally different issue now, that… I’ve not seen before.

I boot the board up and it gives me a “Font Directory Not found” error. Yeah, I know, this is the easy one right. Well, normally I would agree. So I formatted my sd card, reloaded it with the soundfont directory. I Double, tripple checked the naming scheme.

Here’s my config to match that up:

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 4
#define NUM_BUTTONS 1
#define VOLUME 1800
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 4.5
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define ENABLE_SERIAL
#define ENABLE_ALL_EDIT_OPTIONS
#define FETT263_EDIT_MODE_MENU
#define DISABLE_BASIC_PARSER_STYLES
#define KEEP_SAVEFILES_WHEN_PROGRAMMING
#define COLOR_CHANGE_DIRECT
#define COLORWHEEL_ZOOM
#define DISABLE_DIAGNOSTIC_COMMANDS
#define FETT263_DUAL_MODE_SOUND
#define FETT263_LOCKUP_DELAY 200
#define FETT263_SWING_ON
#define FETT263_SWING_ON_NO_BM
#define FETT263_SWING_ON_SPEED 300
#define FETT263_TWIST_OFF
#define FETT263_TWIST_ON
#define FETT263_TWIST_ON_NO_BM
#define FETT263_THRUST_ON
#define FETT263_THRUST_ON_NO_BM
#define FETT263_SAVE_GESTURE_OFF
#define FETT263_FORCE_PUSH
#define FETT263_SAY_BATTERY_PERCENT
#define FETT263_MULTI_PHASE
#define FETT263_FORCE_PUSH
#define FETT263_FORCE_PUSH_LENGTH 5
#define NO_REPEAT_RANDOM
#define SAVE_STATE
#define MOTION_TIMEOUT 60 * 5 * 1000
#define FETT263_MOTION_WAKE_POWER_BUTTON
#define IDLE_OFF_TIME 60 * 5 * 1000
#endif


#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#include "../sound/sound_library.h"
#endif


#ifdef CONFIG_PRESETS
Preset presets[] = {
{ "TeensySF", "tracks/venus.wav",
    StyleNormalPtr<CYAN, WHITE, 300, 800>(),
StylePtr<Layers<RotateColorsX<Saw<Int<5>>,Red>,InOutTrL<TrInstant,TrInstant,RgbArg<BASE_COLOR_ARG,Rgb<255,255,0>>>>>(),
StylePtr<Layers<RotateColorsX<Saw<Int<5>>,Red>,InOutTrL<TrInstant,TrInstant,RgbArg<BASE_COLOR_ARG,Rgb<255,255,0>>>>>(),
StylePtr<Layers<RotateColorsX<Saw<Int<5>>,Red>,InOutTrL<TrInstant,TrInstant,RgbArg<BASE_COLOR_ARG,Rgb<255,255,0>>>>>(), "cyan"},
};

BladeConfig blades[] = {
{ 0,
  SubBlade(3, 131, WS281XBladePtr<132, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  SubBlade(1, 2, NULL),
  SubBlade(0, 0, NULL),
  WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin5> >()}, 
};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif

Font directory not found. Blade doesnt ignite nothing actually happens. Another weird note, I get 3x Font directory not found (Not the normal 2), and no SD card not found, so It sees the card.

Here’s the serial Monitor output:

dcard found…
blade= 0
WS2811 Blade with 132 leds.
WS2811 Blade with 16 leds.
Failed to open: presets.ini
Failed to open: presets.tmp
Scanning sound font: wU⸮=⸮⸮<⸮B⸮⸮⸮횀
⸮⸮>⸮l⸮L%⸮/O⸮⸮|⸮f’⸮^b⸮⸮⸮^⸮⸮N⸮⸮
⸮⸮⸮⸮⸮⸮⸮⸮⸮ NOT FOUND!
Scanning sound font: Welcome to ProffieOS v6.7. Type ‘help’ for more info.
Battery voltage: 0.18
Battery voltage: 0.03
Battery voltage: 0.03
TWIST
EVENT: Twist millis=63017
Ignition.
unit = 0 vol = 0.00, No sounds found: hum
No sounds found: hum
Audio underflows: 1
Amplifier off.
Battery voltage: 0.16

What do you make of the odd characters in the Serial monitor? I reloaded the config to the board to try and see if something weird happened but same results…

Your SD card is corrupted. Reformat the SD and put the fonts back on. Also, in Arduino don’t select “Mass Storage” for USB Type. And whenever you make edits to your SD be sure you Eject from the computer before removing to prevent corruption in the future.

Continuing the discussion from Help with Blade configuration (Morphed to Another Issue):

So I did do that, the formatting, Should I use another card? I never use the mass storage option and I ALWAYS eject.

If you reformatted and it persists then try a new card.

Did and it worked. Uhg. Now I have a no lights problem. Maybe this project was cursed to begin with lol. Goin back to the drawing board on this one I think.

1 Like

That’s not the problem.

The problem is that the blade config doesn’t have the CONFIGARRAY(presets) part.

more information: The CONFIG_PRESETS section · profezzorn/ProffieOS Wiki · GitHub

1 Like

I meant for this, didn’t see blade change

Scanning sound font: wU⸮=⸮⸮<⸮B⸮⸮⸮횀
⸮⸮>⸮l⸮L%⸮/O⸮⸮|⸮f’⸮^b⸮⸮⸮^⸮⸮N⸮⸮
⸮⸮⸮⸮⸮⸮⸮⸮⸮ NOT FOUND!

That means that the font path is broken, it does not mean that the SD card is corrupt.

1 Like

Just wanted to Rechime in on this. I actually went back to square one with it and rewired it because I couldnt get the blade to fire up.

Turns out, config preset was exact the problem with that too. After rewiring I had the same issue, added the missing syntax and both the blade and original sd card worked.

1 Like