Segment questions

Hi all, I’m having some issues understanding segments and numbering.

I understand segment numbering is supposed to start with 0 but something seems off.

If I select 0 to 10 it shows 10 LEDS(I would have thought that would be 11) but I only get 9 LEDS on on my WS2811/15 strip. If I switch it to 1 to 10 (which I would think would be 10 LEDS) it shows 9 and works.

Can someone please clarify operation?

1 Like

I’ve not gotten around to asking this yet. :wink:

Playing with this now via an extreme example…

If I want four segments made up of the first four LEDs, I need to set them up as:

Seg 1: 0-2
Seg 2: 2-3
Seg 3: 3-4
Seg 4: 4-5

I think 0 is a ghost pixel. :open_mouth:

I just tried this on my four-channel, analog setup and it’s different to get that same result…

Seg 1: 0-1
Seg 2: 1-2
Seg 3: 2-3
Seg 4: 3-4

@tonyno
Try this:

Seg 1: 0-1
Seg 2: 2-3
Seg 3: 4-5
Seg 4: 6-7

I’m pointing-out a problem that needs to be documented and hopefully fixed. :wink:

Beyond that, on my addressable strip, that only lights three LEDs (1, 3, and 5).

On the analog version, I only have four LEDs so that doesn’t work.

In any case the next segment can’t start with same led as the last one in the segment before.

s1: 0…2
s2: 2…4 , aahh that don’t work on my side.

s1: 0…2
s2: 3…4 , that works so it has to be because in this way it is designed.

here: https://github.com/Aircoookie/WLED/wiki/Segments
you get only the base information. In one way you are right because this information is not to find in the wiki. You are more then welcome to add it. Open source, so everyone can do it. Yeah the team hsn’t done it yet.

My working example is told more then once on discord while support from the long time team members also from Aircookie.

Next point from opening post

    • If I select 0 to 10 it shows 10 LEDS
      – In this way it has to be configured in the first segment for ten led’s. Software guys like me starting with 0. The 0 is our most important thing.
    • (I would have thought that would be 11)
      – See the answer under 1.
    • but I only get 9 LEDS on on my WS2811/15 strip.
      – on my ws2812, the ws2812b and the sk6812 it is working flawlessy
      Or there is the first led damaged or the DIN line has an issue
    • If I switch it to 1 to 10 (which I would think would be 10 LEDS)
      it shows 9 and works.
      – You have the possibility to ingnore the first LED, see led settings it is there.
      So you dont have to set 1…10 in the first segemnt.

That is logical in the way you configured the segments:
Seg 1: 0-1
Seg 2: 1-2
Seg 3: 2-3
Seg 4: 3-4

Hmm. Lots to try and understand in there somewhere.

Are you saying setting 0 to 10 should result in 10 LEDs?

Shouldn’t an array defined from 0 to 10 be 11 values, not 10.

0 1 2 3 4 5 6 7 8 9 10 is 11 assuming that 0 is the first element.

I see many questions regarding the proper use and understanding of “STOP LED” in segment definitions. @Aircoookie, might it be more clear to use “START LED” and “NUMBER OF LEDS?” The software already uses start, stop, and length and the JSON code can handle either stop or length and derives the other value. I know that the use of “STOP LED” is documented under Segments, but people are either not reading the documentation or not understanding it.

Hi! I believe the primary cause of confusion is that the Stop LED is not included in the Segment range and thus, the stop LED of the first segment should usually be the start led of the next segment.
I have considered length when implementing the segment feature, but I found this easier because you don’t have to calculate where the next segment should begin. Also, the length of the segment is displayed in real time below the start and stop boxes as you edit them, which should make it easier to achieve the length you want :slight_smile: