Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
 
No. And Yes.
 
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.

Latest threads

New Articles From Microcontroller Tips

Back
Top