Tri Cree Config Help (Proffie 3.9)

Hello all, hoping someone can help with this. I have a proffie 3.9 that I’ve set up with tri cree. I have the blue and green die wired together to LED2 and the white die wired to LED3. I would like for the blue/green die to be the main blade and have a flickering effect, and the white die to be the clash and blaster block. Right now, all three die turn on when the blade is activated, and are static (no shimmering or clash). Let me know if you see an issue with my config. Thanks for looking and may for the force be with you.

```

#ifdef CONFIG_TOP

#include “proffieboard_v3_config.h”

#define NUM_BLADES 1

#define NUM_BUTTONS 2

#define VOLUME 1000

const unsigned int maxLedsPerStrip = 144;

#define CLASH_THRESHOLD_G 1.0

#define ENABLE_AUDIO

#define ENABLE_MOTION

#define ENABLE_WS2811

#define ENABLE_SD

#endif

#ifdef CONFIG_PRESETS

Preset presets[] = {

{ “ATCW”, “tracks/venus.wav”,

StylePtr<InOutHelper<SimpleClash<Lockup<OriginalBlast<AudioFlicker<Rgb<0,150,255>,Blue>,White>,RandomFlicker<RandomFlicker<Rgb<0,150,255>,White>,Black>,AudioFlicker<Rgb<100,200,255>,Black>>,White,60>,500,800,Black>>(),

“sky blue”},

};

BladeConfig blades[] = {

{ 0, SimpleBladePtr<CreeXPE2BlueTemplate<240>, CreeXPE2BlueTemplate<240>, CreeXPE2WhiteTemplate<550>, NoLED, bladePowerPin1, bladePowerPin2, bladePowerPin3, -1>(), CONFIGARRAY(presets) },

};

#endif

#ifdef CONFIG_BUTTONS

Button PowerButton(BUTTON_POWER, powerButtonPin, “pow”);

Button AuxButton(BUTTON_AUX, auxPin, “aux”);

#endif

```

If you are only using two LED pins, then you’d want to set the unused LED slots in the blade config to NoLED with a -1 for the power pin. Did you not want your blue and green on their own channels? As it’s wired now, they’ll always come on together, so you can only ever get a cyan/aqua color rather than other combinations of pure blue or pure green.

Since your style uses Rgb<0,150,255> , having white in the third slot means the white die turns on with the main blade. That third slot is being driven by the style’s blue channel, not treated as a separate clash-only white, so it’s just becoming part of the main blade color.

Something more like this might match what you’re after:

SimpleBladePtr<
  NoLED,
  CreeXPE2GreenTemplate<480>,
  NoLED,
  CreeXPE2WhiteTemplate<550>,
  -1,
  bladePowerPin2,
  -1,
  bladePowerPin3
>()

If you get that going, you should be able to adjust your style where clash is specifically calling for WHITE and that will use the White LED to achieve that. Bonus is that you can get a few different colors this way if you want other styles too.

Thank you!! I knew I needed to address/define those pins somehow, I was having trouble figuring out how to write it. The blue/green die are meant to always be mixed, this saber is for a child so I wanted to make something robust and they specifically requested a single color blade. So I came up this solution. I will try the simplebladeptr you suggested and see how it works.

That’s now how the LED structure definitions work. The structures you place for each LED (e.g. CreeXPE2White, etc.) determine what color they react to, not what “slot” they’re in.

See here for more info:

I’m not sure why you’re seeing this issue though @Alena_Reyes. We probably need someone who knows the code better to give a knowledgeable answer…

It seems strange that it would not flicker at all for you (I’d expect it to even if the colors are misconfigured as in your original post), but I also haven’t looked deeply at what your style is doing either.

Fair on the slots, that’s just how I keep RGBW configs straight in my head as convention, but you’re right that the structs are what actually drive it.

@Alena_Reyes quick fix first: that Cyan template I posted was a typo, I meant Green, just had cyan on the brain since your blue and green are combined. Edited my post for posterity :shushing_face:. The biggest issue was that the colors your style was calling for were essentially the same. So if you want to keep your wiring you could ignore the true colors of Red Green Blue and call the LED you want based on which template you give it in SimpleBladePtr. Set your blue/green die to a Green template (but with appropriate resistor value for your combined green/blue) and your white die to a Blue template (but with resistor value for white). Then green drives your main blade color and blue drives the white die, independently. Could be like this assuming your resistor values from the original shared config were correct:

{ 0, SimpleBladePtr<NoLED, CreeXPE2GreenTemplate<240>, CreeXPE2BlueTemplate<550>, NoLED, -1, bladePowerPin2, bladePowerPin3, -1>(), CONFIGARRAY(presets) },

So in your style, green (shows cyan) is your main blade color, and you bring in a little blue (shows white) for the shimmer. You probably don’t want 255 so maybe try 100 so when you get a flash you can tell the difference. Then push blue to full on clash and blast so those still land as a clear, separate white flash. Each die still glows its real color, cyan or white, the template just picks which value controls it. You then could try a style like this where green is the main blade and you layer in white where you want flickers, blasts, and clashes. It might look something like this based on your original style (I just swapped out the colors but you might need to tweak this and even try a simpler blast effect since in-hilt LED).

StylePtr<Layers<
  Layers<
    Green,
    AudioFlickerL<Rgb<0,0,100>>>,
  OriginalBlastL<Blue>,
  LockupL<RandomFlicker<RandomFlicker<Green,Rgb<0,0,33>>,Black>,AudioFlicker<Rgb<0,0,100>,Black>>,
  SimpleClashL<Blue,60>,
  InOutHelperL<InOutFuncX<Int<500>,Int<800>>>>>()

jedimaster,

I caught that typo in the code, and I changed it while I was implementing it in my config. I’m happy to say that it worked! I got the blue/green as the blade, with white for clash and blaster. I’m not getting any blade shimmer, just the white flash so I will be trying this new bladeptr you posted later. I greatly appreciate your help!

Awesome, glad to hear it. I’m pretty sure the lack of shimmer is just based on the color similarity on that part of the style. Anyway, let me know how it goes. Happy to help where I can.

Thanks a million again, your code worked a treat. It’s behaving exactly how I wanted it to. I think I’m safe to button this one up. It’s giving me nostalgia for the old days, when tri cree was the standard!

Here’s a video so you can see it in action

1 Like

That looks fantastic! Thanks for sharing the video.

1 Like