I recently picked up a Korbanth VeeOne and since it is my first crystal chamber saber I’ve been playing around with styles for it. Wall of text to follow. ![]()
One thing I see with the way that the factory configuration is done is that the two crystal chamber LEDS are using different data pins, and so are set up as different blades running different styles.
One thing I wanted to do was run the same style on both LEDs as a single blade. I like the idea of being able to have effects fade across the two LEDs, etc. On the other hand I don’t really want to rewire this thing.
I did some experiments adding a what I called a combo blade, which is basically a virtual blade that forwards the various commands sent to the actual blades and has a length equal to the number of LEDs in the two real blades that it sends commands to. The code that I have is extremely hacky, but seems to mostly work - at least if I only use two LEDs.
For example, for my blades array, previously I had the two individual blades listed like this:
#define NUM_BLADES 3
BladeConfig blades[] = {
{ 0, WS281XBladePtr<128, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<1, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
};
Using the ComboBlade idea I could instead do this
#define NUM_BLADES 2
BladeConfig blades[] = {
{ 0, WS281XBladePtr<128, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
ComboBlade(WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<1, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
I wasn’t sure if this was an issue other had come across previously and if so how they had solved it. Is it worth spending some time cleaning this up for other to look at? I’m pretty new to this lightsaber thing but always like to play with code and electronics.