arduino and keypad storage and playback

Hi,

I'm working with an Arduino Mega and a small five-pin keypad. I've already determined the rows/cols of the keypad and gotten it working relatively well using a keypad library.

My keypad has six number keys and a hash key. What I want to do is this:

At the keypad, I will type in 4 to 8 digits. I want the arduino to watch which pins go high (for each digit) and then after a preset event occurs (like a switch being thrown or input from some other source is received), to play back the same sequence of high pins through a different set of pins on the arduino which are connected to a different device.

If I press the hash key, the pins for the hash key should be played back without delay.

The problem I have is the library I am currently using to use the keypad (keypad.h) will translate my pin values to their actual keypad characters, so I think I'd have to write something from scratch to just store and record pin values while still doing debouncing etc for the keypad, and I'm not sure where to begin.

Can anyone who's done something similar point me in the right direction?

Draw a flowchart of what you are trying to accomplish.

The problem I have is the library I am currently using to use the keypad (keypad.h) will translate my pin values to their actual keypad characters,

Then translate them back, eg you know that "5" means input 3 and 6 are shorted (or whatever) so have a lookup table that decodes this back to what you need.

But you're going to do something different with the information anyway, so you don't really have to know the actual pin used for each button do you, just the fact that the sequence XYZ# was entered?


Rob