Various Blade Style and Blade Config questions

I am working on a prop that will have lots of isolated pixels. The main reason to pixels is its a lot easier to control and create, then ic’s and timers, etc. to make led’s flash in sequence. Also, this way I can change colors of the whole thing.

Here is my blade config:

BladeConfig blades[] = {
 { 0,
     SubBlade(8, 15, WS2811BladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin1>>()), // b1 front green scanny thing
     SubBlade(0, 3, NULL),  // b2 big blue scanny thing
     SubBlade(4, 5, NULL),  // b3 side by side green
     SubBlade(6, 7, NULL)   // b4 up down red
   
     SubBlade(11, 12, WS2811BladePtr<12, bladePin, Color8::GRB, PowerPINS<bladePowerPin2>>()), // b5 top exterior lights
     SubBlade(6, 9, NULL),  // b6 alpha beta gamma delta
     SubBlade(3, 5, NULL),  // b7 geo met bio
     SubBlade(0, 2, NULL)   // b8 green up dn meter
	 SubBlade(10, 10, NULL)  // b9 pwr light

     SimpleBladePtr<CH1LED, NoLED, NoLED, NoLED, bladePowerPin4, -1, -1, -1>(), // b10 lower lights (two red leds)
	
     CONFIGARRAY(presets) },
  };

The last 2 led’s wont have room to run 3 wires, only 2 (so, 3.3v and led4 in this case)

Is this too many blades? Is there a blade limit? Can WS28xx be mixed with regular led’s?

no
yes
yes

2 Likes

You could try a thinner wire.

Very to the point, I like it.

As for the code above, I assume the blades can be in any pixel order like I have? And the order they are defined is the order the blade styles need to be in?

SimpleBladePtr<CH1LED, NoLED, NoLED, NoLED, bladePowerPin4, -1, -1, -1>(),

Is this portion written correctly?

That’s a good idea! However, It’s actually restricted to using 2 metal hinges as conductors. That may give away what I am working on :grin:. I looked into modeling and printing some hinges with passageways, but decided to go with the screen accurate hinges.

I toyed with the idea of splitting one of the hinges and making a non conductive filler.
Screenshot 2024-11-19 160921.PNG

But I think it would be pretty noticeable. Also, a lot of flexing, so It would have to be silicon or something. the stuff with the largest insulation!

I think I am fine with just being able to fade them out or turn them off.

Wait - another question, can you do more with standard led’s, on an led pad, then fade and turn off?

Yes, the order of the subblades is whatever you want it to be.

Uhm, yes?
It can blink, pulse and do various random behaviors.
Even more becomes possible if you don’t light it up 100% to start with.

Thanks, more to look into when I make it.

Is this blade config correct?

SimpleBladePtr<CH1LED, NoLED, NoLED, NoLED, bladePowerPin4, -1, -1, -1>(),

Is it formatted with four channels because of the possibility of a 4 led cree? What is the reason for the "-1"s?

Sorry, but I did say various questions…

Yes, it looks correct.
And yes, the four channels are for 4-led crees, and similar.

I was looking at the TD config, this is the sequence for the front leds:

StylePtr<InOutHelperTD<SimpleClash<ColorSequence<2000,
                         Rgb<255,0,0>,Rgb<255,255,0>,Rgb<255,0,255>,
                         Rgb<0,255,255>,Rgb<0,255,0>,Rgb<0,0,255>,
                         Rgb<255,255,0>,Rgb<0,255,255> >, RandomFlicker<WHITE, BLACK>, 6000, EFFECT_BLAST>, 100, 100, 6000, BLACK>>(),

If its a solid color led, what do the rgb color codes do?

Typically, when you’re programming a single color LED, you’d use the appropriate channel. So for red, degrees of Red being Rgb<255,0,0> is 100% full, Rgb<128,0,0> being 50% and so on.
To not have to worry about what color per-se you can just use degrees of white to vary the brightness, where White or Rgb<255,255,255> is 100% full, Rgb<128,128,128> being 50% etc…
Even though you’re using white, it’s really only reading the Red channel if you are using CH1LED. White just makes it “universally” easy incase you want to copy/paste the same style to a different color LED or something.

In the TD config, channel 1/2/3 area each hooked up to a separate, white LED.
So Rgb<255,0,0> lights up the first one, Rgb<0,255,0> lights up the second one and Rgb<0,0,255> lights up the third one. For small sets of lights, this can offer an alternative and more compact way to control the lights, otherwise you have to write three separate styles and make sure they are synchronized.

I love reading about this stuff, but I don’t know if I will ever get the hang of it.

Would a simple style such as Pulsing<Red,Black,2000>(), work for slow pulsing a red standard led?

Yes*.

[*] Unless you configure it weirdly.

How could it get configured weirdly?

SimpleBladePtr<CH2LED, NoLED, NoLED, NoLED, bladePowerPin4, -1, -1, -1>(),

This reads from channel 2 (green) which would be reasonable for a green LED.
For a red LED it would be weird, and it wouldn’t Light up if you use a style like Pulsing<Red,Black,2000>().

CH1LED (or whatever class you specify) is responsible for mapping the RGB values into a single value that specifies how much power to give the LED, but there are no guard rails, so you can configure it in ways that makes no sense for the configuration you actually have.

Ah, ok. Thanks. Is there somewhere I can read more about how this works? Like the fact that channel 2 is intended for a green led, etc.? I assume CH1 is for red?

I have been reading the pod, and weaving in and out of the github files trying to resolve things in my head. (may be a lost cause)

1 Like

@orntar And the templates for those CH1LED CH2LED etc… are in ProffieOS/blades/leds.h so you can see the way they work.