MTB Ramp Project Question

Hi there and first of all: Thank you for your great work, Aircookie!
We plan to build up a Biking Ramp for “illuminated MTB jumps” with four WS2812b segments; so far so good - now a step further we bring a little IR sensor in on GPIO0 trigger (D3@wemos-d1-mini) and everything is working like a charme with the macro preset of v0.11.1 “Mirai”, BUT: when flying over the ramp we would like to fire a special effect for only a few seconds and then went back to the original running preset… how can we configure this, please? are there any “timeout settings” for our needs, please?
Thank you very much in advance.
Greetings from Cologne,
Paule

You can add an ultrasonic sensor, set lower and upper thresholds, and trigger the special effect when proper conditions are met - like consistently climbing or falling until it reaches the threshold, and not just a bird flew by at a strange angle.

You might look at the latest “Staircase” usermod. I think it would work as is with ‘4’ stairs (your current segments). It already has code for an ultrasonic sensor as well.

thank you for your reply huggy.
but your mentioned scenario is not exactly what I was looking for:
an IR sensor is well fitted and working fine so far; I just want to go back to the previous effect/preset after the GPIO0 input was triggered; thus I am looking for any kind of “timeout” oder “countdown” setting to return to the default effect/palette…

You can save the current state to a preset (&PS=16&NP) and restore it after (&PL=16). 16 being an example, preset slot.

it seems that I am unable to use this with v0.11.1 “Mirai” or did I miss something? :face_with_monocle:

What do you mean?

okay, I will try again:
the ‘advanced macros’ configuiration option seems to be gone in v0.11.x and v0.12.0… thus I have no idea how to configure the requested countdown option somewhere as kind of ‘duration seconds’ for a preset after pushing the button nor how to use previous commands like (&PS=16&NP) and (&PL=16)…

e.g.: this is my ‘specialFX’ API command from the preset 1 view:

{“on”:true,“bri”:248,“transition”:7,“mainseg”:0,“seg”:[{“id”:0,“start”:0,“stop”:150,“grp”:1,“spc”:0,“on”:true,“bri”:255,“col”:[[255,113,94],[0,0,0],[0,0,0]],“fx”:111,“sx”:165,“ix”:206,“pal”:0,“sel”:true,“rev”:false,“mi”:false},{“stop”:0},{“stop”:0},{“stop”:0},{“stop”:0},{“stop”:0},{“stop”:0},{“stop”:0},{“stop”:0},{“stop”:0},{“stop”:0},{“stop”:0}]}

How may it be modified to use a 5sec count down and go back to preset 16?!

Thank you very much for further hints to get this working - HAPPY EASTER so far :sunglasses:

found some easter eggs - maybe someone else is looking for a similar solution :wink:

  • created preset 16 as the standard effect (including segments)
  • created preset 15 with a special effect
  • created preset 1 with API JSON code:
    {“playlist”:{“ps”:[15],“dur”:[60],“transition”:0,“repeat”:1,“end”:16}}
  • settings button press to “1”

… and all is working like a charme :partying_face: