A quick question.

Status
Not open for further replies.

SwingeyP

Member
Does this thinking make sense?

I want to light some led's in a kind of random sequence after a set time until an interrupt occurs.
This is my thinking does it make sense?

on interupt switchalloff
call waittime
loop: call lightleds
goto loop

end
______________________
waittime:

wait 3 mins or so
________________________
lightleds:

run led sequence
________________________

switchalloff:
turn all outputs off
reset interupt


make sense? Will it work?


Thanks in advance - Paul
 
I think it would.. I can't see why not..

If you switch all off in one interrupt... Organize the interrupt for a 3 minute ( or so) delay so when it fires it will run the LED sequence... Then just reset and it will loop...
 
Thanks Ian.

I'll have a play and see what I come up with. Sometimes it just helps to share your thoughts.

Cheers - Paul
 
Running a lightshow in 3 minute cycles is not really random.. What do you mean when you say "I want to light some led's in a kind of random sequence"?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…