led blinking sequence (after interrupt)

Hey everyone, i'm new to ardunio

so, im doing this mini project:

I have set of sequences for my leds. 1 to 2, 2 to 3, 3 to 1 and vice versa so total six set of sequences. I know how to code for led blink. that's fine.

my question is [u]during led sequence say from 1 to 2, if i give an interrupt, i want the sequence to run backwards[/u].

(example- say sequence for led blinking is abcdef and at any point if i give an interrupt, example d the next sequence has to be cba. )

thanks in advance :)

Are you using blink with or without delay - if its with then see blink without delay. Other wise POST YOUR CODE!

Mark

If you use blink without delay then you won't need to use an interrupt to read the button/switch/trigger.

You would change leds when one blinks off or at the end of the off period and use a variable to control forwards or backwards sequence. But what behavior do you want when the sequence reaches an end? Looks like it should just keep going of forward but stop at 1 when reversed.

thanks i got it :) i tired something

summi11: thanks i got it :) i tired something

I get tired something else too when I get frustrated.