Previous: , Up: Dynamic Control: The TRIGGER Construct   [Contents]


2.3.4.2 Examples

Scenario A: "Turn the light on if it’s dark, off if it’s bright."

Here, you are controlling one light based on one sensor. We use the Target Block with multiple rules inside it.

Scenario B: "When I turn on the first lamp, automatically turn on the second and third lamps too."

Here, you are triggering a chain reaction across multiple outputs. We use a TRIGGER to assign the value of the first lamp to all the others simultaneously.