# Is there any documentation on how the effect engine works?

**URL:** <https://wled.discourse.group/t/is-there-any-documentation-on-how-the-effect-engine-works/7840>\
**Category:** Questions\
**Created:** [March 22, 2023, 3:55pm UTC](https://wled.discourse.group/t/is-there-any-documentation-on-how-the-effect-engine-works/7840 "2023-03-22T15:55:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwalter](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mwalter](https://wled.discourse.group/u/mwalter)\
**Post date:** [March 22, 2023, 3:55pm UTC](https://wled.discourse.group/t/is-there-any-documentation-on-how-the-effect-engine-works/7840/1 "2023-03-22T15:55:06Z")

</div>

I’m trying to build some static light effects that don’t loop and only turn on or off.  
Currently, I’m at the point where I can create my custom effect and enable it via the UI.

I’m struggling with the timing concept within the light effects; there is no delay (which makes sense).  
Can anyone give me an example snippet on how I could turn on LED after LED and have it not loop?

Cheers

---

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [March 22, 2023, 7:58pm UTC](https://wled.discourse.group/t/is-there-any-documentation-on-how-the-effect-engine-works/7840/2 "2023-03-22T19:58:26Z")

</div>

I am not sure I understand your question or request, but there are a few ways to keep information of effect state between calls.

One is use of SEGMENT (or SEGENV) variables, another is use of `allocateData()` memory.

There are a few effects that use both ways.
