Changing Length via Macro/Button

Hi

I would like to install a small playground at our school
Pupil shall be able to stack several modules with LED and they are controlled via buttons
One button for instance shall change the brightness, thats already working

But since the amount of LED is variable, I would like to change the length of the strip or the amount of LED via a button.
I looked for a macro, I found “&LC=xxx” but it’s not working.
After reading the macros page under features I got the feeling it’s not possible. But maybe someone here has a good idea

Thanks a lot

Anja

you can not change “hardware configurations” via buttons, those are stored in the config.

What you can do is call macros i.e. presets and presets can change the number of “used” LEDs via segment size.

Hi and thanks for the reply

damn, that’s what I was worrying about.

With segments I played around but couldn’t find a working mode, maybe you can help me here.

What I did:
for testing I made two segments, one from 0-100 and one from 100-200
But when I start the chase effect, I have two times a chase instead of one.
When I delete the segments it is only one, of course.

So would be great if you can give some additional hints, thanks a lot.

P.S.: what I also tried is splitting segments in
0-100 and
0-200
I thought maybe I can enable and disable them, but only the last one seemed to be active

make two presets:

first one with one segment, 0-100

second one also with one segment, 0-200

to some extend that works, but unfortunately it’s not usable for me
One thing which is an issue is that if I switch to the segment with fewer LED while some of the last LED are still on, they stay on
But that wouldn’t bother me.

But my setup is as following:
I have made some waggons, each with 10 LED.
The idea is that the little ones can put them together in a chain. So the length of the strip is between 10 and 100 LED, so I would need 10 segments.
That would be feasible, but I would like to give them the ability to switch between several effect, like Drip and Chase
So I would need to make 10 presets for each effect, adding up to a lot, 40 or 50.
And then I have to think about a clever way to switch betweeen them…

Maybe I ask on github for the feature :slight_smile:

no, you just need presets for lenth and presets for effects, not in combination. a preset can just change the effect and nothing else.

Thanks a lot again
I can change the effect without changing the segment, but I couldn’t figure out how to change the segments without changing the effect.

But I will go back to the drawing board and read again, also about the JSON API you suggested.

Probably I will be back here again, but fingers crossed I find the solution.

Best
Anja

this sets a segment of length 50 and nothing else. i.e it also does not remove additional segments, just sets segment 0:

{“seg”:{“id”:0,“start”:0,“stop”:50,“len”:50,“grp”:1,“spc”:0,“of”:0,“on”:true,“frz”:false,“bri”:255,“bm”:0,“rev”:false}}

Ooooh, thanks a lot, I’m starting to get a guilty conscience

I’m still on it, I have a short testsetup with only 15 pixels.
So I have made 3 segments, 0-5, 5-10 and 10-15

Also three presets to turn them on (and off):
{“seg”:[{“id”:0,“on”:“t”}]}

I can switch between effects with two presets
{“seg”:[{“fx”:“Chase”}]}
{“seg”:[{“fx”:0}]}

So maybe I’m getting closer, it’s still not working, but let’s see.

by the way:
I tried with three segments 0-5, 0-10 and 0-15
But when I turn segment 0 and 1 off, and only 2 on, then the first 10 LED stay dark
Seems like third segment can not “override” the status of the first two

if you want to change the length, you only need one segment and use the command I gave to change the length with a preset. if you define three segments, they will overlap, which is only well supported in 0.16 and not so well in 0.15

Oh man….
Now I feel a little bit ashamed

I didn’t get the idea of changing the properties of the segment during runtime, that’s so easy and clever (I see now…)

So that’s working as I imagined so far, thanks a lot!
I will move on building the installation and in case will come back for questions.

Take care!