I would like to know if it is possible for the arduino to take 4 digital inputs and know the sequence in which they go HIGH. So if they go in in the order of 1,2,3,4 the arduino will know to do one thing, and if they go 4,3,2,1 it will know to do another. To complicate things further, the inputs don't just go 1,2,3,4. They are constantly repeating in that order like, 1,2,3,4,1,2,3,4,1,2,3,4 but the pattern doesn't always start at 1 or at 4. It may be 2,3,4,1,2,3,4. Is there code that will keep an led on as long as the pattern 1,2,3,4 is happening, and turn the led off as soon as it stops, but turn another led on as long as the pattern 4,3,2,1 is happening?
Yeah sure!
You just need to code the events and the arduino does exactly what you want.
If you make some pseudo code or a flowchart of what happens when, you can use that to code the sketch.
BTW the question is close to unreadable if you do not push enter to get new lines and such