Jump to content
C4 Forums | Control4

Blinking Lights


Recommended Posts

If you want something to happen when the timer expires (e.g. The lights to turn back on) then you need to put that code in the timer expires event.  

So delete your if statement and all the code nested under it.

Go to the timers on the left hand side of the screen and choose your 2 second timer. Then choose the on expires event for this timer.  In that section add the two lines of code to turn the two lights on.

If you want to repeat this (E.g. Have them flashing on and off every 2 seconds for a minute) you can use a repeating timer (I've no idea how to do this) or have a second  timer which is a 1 minute timer which you start at the same time as you currently start your 2 second timer and in the code for the 2 second timer expires you do the following:

turn on lights (2 lines of code)

delay 2 seconds

turn off lights (2 lines of code)

if one minute timer is running

     Start 2 second timer


Hope that helps!

Link to comment
Share on other sites

Timer 2 seconds repeating. 'Flash'

Number variable 'Counter'

WHEN timer expires
Variable->Counter = Variables_>Counter +1 {adds 1 to the counter)
Toggle Light {use toggle for two reasons. First it's lesss programming, second it will end up reverting the light to where it was before (well at least to where it was on or off}


When the variable Variables->Counter changes
IF Variables->Counter equals 30 {or whatever runtime (x2 seconds) you want, just make it an even number to ensure the toggle light returns to 'original' state}
	STOP timer->Flash
	Variables->Counter = 0

As mentioned, advanced lighting scenes have a flash option, but note that it only works on the current gen lighting (and unsure on 3rd party lights compatibility) - but if you'd like to return to previous state - the above is probably still simpler to use.

Link to comment
Share on other sites

I have a scene like this in my system. Lights flash twice when the bell button is pressed. I created a flashing scene in the Advanced Lighting agent.

When bell button is pressed

Take snapshot 

Activate flashing scene 

Recall snapshot

It works very nicely. 

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...