Accent LED's setup and behaviour?

Hi.
I’m doing my first proffie project, and to be honest find the software setup a little confusing.

The saber is a KR sabers Luke ECO Hero kit.
Everything works just fine, blade, switches, accents and sound.

Wanting to make my own config I have done the following:
I have wired an accent led to pin4, and another to pin5, with resistors.

I changed
NUM_BLADES 3

Then the blade config:

BladeConfig blades[] = {
 { 0, WS281XBladePtr<132, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
   SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(),
   SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin4, -1, -1, -1>(), 
 CONFIGARRAY(presets) },
};

Now I get this error msg:
In file included from C:\Users\johnn\Documents\ProffieOS\ProffieOS.ino:621:
C:\Users\johnn\Documents\ProffieOS\config\jsconfig1.h:20:47: error: cannot convert ‘const char*’ to ‘StyleFactory*’ in initialization
20 | StyleNormalPtr<WHITE, WHITE, 300, 800>(), “white”},
| ^~~~~~~
| |
| const char*

exit status 1

Compilation error: cannot convert ‘const char*’ to ‘StyleFactory*’ in initialization

If I change the NUM_BLADES to “2” and delete one of the SimpleBladePtr lines, it works fine.

Any tips?

Also, how can I define the behaviour of the accent leds(blinking)?

Thanks, Johnny

This is because each preset also needs to have one style per blade.

One style per blade.
Each style controls what that “blade” is doing.
Accents are also “blades”.

Got it, thanks! :pray:

This is what I ended up with:
StyleNormalPtr<GREEN, WHITE, 300, 800>(),
StylePtr<InOutHelper<Lockup<Sequence<White, Black, 150, 16, 0b1111111111111111>, AudioFlicker<White, Black>>, 1, 500>>(), StylePtr<InOutHelper<Lockup<Sequence<White, Black, 200, 16, 0b1100110011000000>, AudioFlicker<White, Black>>, 1, 500>>(),
“white”},

This can be simplified to just: White.
Doesn’t really matter unless something is slow or you run out of flash memory though.

1 Like