Look for series of values in input data

Hi! I am trying to setup a system which reacts if a certain series of 6 dtmf tones are sent to it, lets say 1,2,3,4,5,6. Using some other people code i have managed to decode DTMF with a simple 8870 chip. Now i need to work out how to process these values, looking for the correct series of values and when it recives them it needs to turn on digital pin 13. How would i do this? I am ccompletely clueless when it comes to programming. My current code can be seen here: http://operationhelios.com/cutdown_code/v1_0.ino

Sorry. Just to make it clear the arduino might hear: 4685464646147614348643416468*123456*

And then be required to turn of digital pin 13.

Code that short should have been pasted in the post, in a code box. If you want to detect a pattern in the input stream, you should save the incoming data in an array. If the stream is endless, you could use a circular array, or simply shift the n bytes up one position each time, if the pattern length is short.

I can't tell from that code "what the Arduino might hear". Is keyvalue "what the Arduino hears"?

 if (digitalRead(3) == HIGH) { keyvalue = keyvalue + 2; }

You should learn about the compound operators like ++, +=, etc.

 if (digitalRead(3) == HIGH) { keyvalue += 2; }

How would i do this? I am ccompletely clueless when it comes to programming.

Then, this hardly seems like a beginner project, unless you are willing to learn.

What is the ultimate goal of this project, and how much of the project has been realized?

Some reading material: http://arduino.cc/en/Reference/Array http://arduino.cc/playground/Code/QueueArray

If you need to detect a sequence you start with reading until you got the first char. Then you can compare the next incoming chars with the search pattern until either all chars are matching the pattern or you find a mismatch. In the first case it's time to party, in the second have a serious problem.

e.g. given incoming 121212456...

if you search for 12124 you start @pos 0 and stream will match 1212 and then a mismatch @pos 4: 4!=1 . Then you should go back to pos 1 (mismatch 1!=2 ) and go to pos 2. So you need to keep a buffer at least the size of the pattern you try to match.