Light Bulb ON and OFF

Hi I would like to achieve this:

One Light bulb, and changing its status periodically and repeatedly from On (Light is on) to OFF (light is OFF) and ON …oFF …

What is the best way to do this.

Regards.

Mila [import]uid: 83418 topic_id: 22480 reply_id: 322480[/import]

Try looking up the “timer” API docs for more details but here’s an example…

timer.performWithDelay(1000, SwitchOnOrOff, 0)  

The “1000” is the milliseconds between the function being called, “SwitchOnOrOff” would be the name of the function that would turn the light on or off, and the “0” is the number of times to repeat (in this case, 0 means repeat forever and ever)!

Give it a shot and see how it works out!
[import]uid: 11636 topic_id: 22480 reply_id: 89651[/import]