Hi there,
How do you distinguish which led lights up, the green or red arrow of lukes control box if both leds are running off data2 pad of the proffieboard? (the pcb with the arrow lights has only 1 data in pad).
Are they wired in series?
Not sure, the data in is on the far left then L1 to its right then L2
I am no expert so I would have others put in their two cents but I believe in can be set up as a subblade
Thanks man, I have heard of that but not sure what it looks like in code
I briefly looked into it and I think you can set them as SubBlade with the first one addressing 0 which would be the one closest to data in and the second SubBlade addressing pixel 1 which would be the one farther from data in.
And then set the appropriate behaviour by having a separate style for each.
Oh ok that sounds right, I think theres documentation somewhere on sub blades, Ill try find itš
I have a 131 led main blade using data1 and blade power pins 2 and 3. Then the control box with 2 separate leds in series using data2 and blade power pin 4.
Read the doc. on sub blades but still confusedš¤
Iām not sure if this is completely correct but I think it would be like this:
{ 0, WS281XBladePtr<131, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
SubBlade(0,0,WX281XBladePtr<2, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4>>()),
SubBlade(1,1,NULL),
CONFIGARRAY(presets) },
};
Thanks for that Matt, just making sure before I wire everything up
Iām sure others will correct me if Iām wrong but that setup seems to compute in my head at least ![]()
@T_Kita, @MattDoug27ās response here LGTM, fwiw, according to your description.
Then all youāve gotta do is figure out which is which. It does seem reasonable that L1 would be the first and L2 the second, but you could check by using StylePtr<WHITE>() on the second blade style, and StylePtr<BLACK>() on the third (the first is your main blade, to be clear). Vice versa if you want to really sanity check. In case itās not clear, the WHITE will make one LED light up and the BLACK will make the other stay unlit.
I assume you know youāll need to change the NUM_BLADES define at the top of your config to 3 if Mattās bladeconfig has more or less blades than whatever config youāre working off of, and that presets will all need 3 blade styles each to accommodate this change also.
I suppose Iāll also plug ProffieConfig since it can make that insertion/removal of blade styles and keeping everything in sync automatic so you know everythingās right in code, and then youāve just gotta worry about the actual blade configuration and choosing your blade styles ![]()
Thank you ryryog25 yes that all makes sence to meš
@T_Kita can you update this thread when you get it wired and try this code so Iāll know when I eventually do a build like this?
[quote=āMattDoug27, post:12, topic:7672ā]
{ 0, WS281XBladePtr<131, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
SubBlade(0,0,WX281XBladePtr<2, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4>>()),
SubBlade(1,1,NULL),
CONFIGARRAY(presets) },
};
[/quote
Sure thing ![]()
Heres the code for the control box as promised, tested and works.
//Luke bladestyle
(),
//led 2 green
StylePtr<Layers<
TransitionLoop<RgbArg<BASE_COLOR_ARG,Green>,TrConcat<TrBlink<3000,9>,Black,TrDelay<2000>>>,
InOutTrL<TrInstant,TrInstant,TransitionLoop<RgbArg<OFF_COLOR_ARG,Green>,TrConcat<TrBlink<3000,5>,Black,TrDelay<2000>>>>>>(),
//led 1 red
StylePtr<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,TrBlink<2000,5>>>,
InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,RgbArg<OFF_COLOR_ARG,Rgb<255,0,0>>,TrBlink<2000,5>>>>>>()},
};
BladeConfig blades[] = {
{ 0, WS281XBladePtr<131, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
SubBlade(1,1,WS281XBladePtr<2, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4>>()),
SubBlade(0,0,NULL),
CONFIGARRAY(presets) },
};
#endif
#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif
Kind Regards
Thank you!
Hi everyone, this code is wrong somehow. The control box lights up perfectly but the emmiter doesnāt. I read the sub blade documentation and you can only have one blade definition?
Checked all connections using the multimeter ābeepā test. Data1 goes to the main blade, data2 to the control box.
Stuck here, could use some help.
Thanks