Proffie v3.9 power button control issue

CreeXPE2WhiteTemplate has several functions:

  1. It activates the LED when the style is white
  2. It manages the current to the LED to not over-power the LED. (In accordance with the CreeXPE2 datasheet.), and the resistor you have chosen, which in this case is zero. With zero resistance, the LED may be turned way down, or off if the battery voltage is high.

If you want to disable the current managing, using 0 is not the way, use a high value, like 10000 instead.

You may want to just use something like CH1LED instead. CH1LED doesn’t have current adjustment and activates when the style is blue (or any color that has blue in it, like white.).

A simple style that is “white while on” would be StyleNormalPtr<White, White, 300, 500>(). If you use a style like that for the second blade in each preset, the LED should turn on properly.

yes but this means editing every font on the blade. can’t it be done by for example making CH1LED or the Cree template activate at red green and blue?

After asking gemini about the problem with the lightsaber not entering sleep mode it suggested that i should add this line to my config and it worked. The saber now poweres off without a problem.I am not using gesture on or off though, i will test it tomorrow with those on.

#define MOTION_TIMEOUT 1000 * 5

It can be done, but it’s not how it works right now.
Changing out a few styles should not be difficult.

well the led is not really that much of a problem. i’m glad i managed to fix the sleep issue. Another question i have. The blade uses a TP5000 bms. is it correct to connect the output of the bms to GND and BAT+ on the board?

Yes, that should be fine.
(There are many ways to do it though.)

When we define the maximum number of LED’s on a blade what happens if you put more than there actualy are installed? Does it affect the light in any way?

If you have effects that show only at the tip like drag and melt, if you blade is defined too long, they will not show on your blade. If it is 1 pixel too long, you will probably not notice but 10%ish too long will probably hide the effect.

ohh ok i understand now. But in the config we define the number of LED’s per meter or per strip or the total number of LED’s the blade has?

It’s both:
const unsigned int maxLedsPerStrip = 144; //144 per meter, only change the number if more than 144/m !

And here is the exact number:

BladeConfig blades[] = {
 { 0, WS281XBladePtr<132, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
    SubBladeWithStride(1, 15, 2, NULL),
    WS281XBladePtr<1, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin1> >(),
    CONFIGARRAY(presets) },
 };

If you need to find how many led you have in a blade, you can use the blade length finder blade style:
StylePtr<LengthFinder<>>(),
more info here:

got it. thank you.

My blade has 2 strips back to back and each one has 114 LED’s x 3 rows (342 per strip) and one more led on the very tip of the blade. So total is 685 LED’s. Whatever i do i cannot light up the LED on the tip. It does light up in the led counter style. Any ideeas?

I never had more than 138 leds, so no I can’t really help you.

Beefier battery maybe ?

the battery is not to blame. it lights up the blade without a problem. it’s just that the last led doesn’t want to light up at all. i could only see it in length counter.

Did you do = 685
&

685 in here too ?

So what number does it say when it lights up in the led counter style?

last led is number 115. the one on the tip.

i tried this yes.

I am unable to visualize what that means, maybe post a picture or a drawing of a diagram on how all those leds are wired ?

Leds that are wired in parallel count as one. How are your 3 rows wired together ?

How many leds light-up when you are on number 1, or any number between 1 to 114 ? Does anything light-up when you are on 116 ? (I have not used length finder in a while and I can’t remember if only that led lights-up or all of the leds, up to that number, light-up?)

I am starting to suspect that your number of leds (as far as ProffieOS is concerned) is only 115 ?

So the last LED that lights up in length counter is 115. 116 does not exist. I think it actually lights up in every preset it’s just that it still has a bit of a shadow on the tip and i thought it doesn’t. I have another question for you guys. Is there a lightsaber core that supports two 18650 batteries or even bigger?

Two 18650, yes I have seen one or two on some Youtube install video but I couldn’t tell you from who.
Bigger than 18650, that I have never seen in a saber.