Hi all!
I just wana know if it is possible to run 2 loops at the same time?
Also, assume you want 2 LEDs to flash at the same time BUT with different frequencies...
example: LED1 every 1 second and LED2 every 2 second.
Here's the algorithm i came up with:
loop
LED1 on
LED2 on
delay 0.5 second
LED1 off
delay 0.5 second
LED2 off
LED1 on
delay 0.5 second
LED1 off
delay 0.5 second
goto loop
Does it make any sense? this is just an algorithm...no need to write proper codes....
Your replies will be welcome,
I just wana know if it is possible to run 2 loops at the same time?
Also, assume you want 2 LEDs to flash at the same time BUT with different frequencies...
example: LED1 every 1 second and LED2 every 2 second.
Here's the algorithm i came up with:
loop
LED1 on
LED2 on
delay 0.5 second
LED1 off
delay 0.5 second
LED2 off
LED1 on
delay 0.5 second
LED1 off
delay 0.5 second
goto loop
Does it make any sense? this is just an algorithm...no need to write proper codes....
Your replies will be welcome,
Last edited: