Separat Buttons Keypad, help!

Good evening Forum!

I want to make a codelock for my door since the "Secret Knock Detector" is very unpractical :stuck_out_tongue:

I have a non-matrix keypad that is basicly just 12 buttons that look like a Matrix keypad.

Is it possible to sorta label each button with a letter and match it up with a set "password" by pressing another button? Keep reading :stuck_out_tongue:

Button1 = A
Button2 = B
Button3 = C

Passord = (A,B,C)
Storage = (Here goes the letters that you press on the Keypad)

So when you fill the "storage" with letters and press "#" on keypad the Arduino checks if the "storage" is the same as "password". If not, no accsess. But if it is, a small gearmotor will open the door.

I don't really have much experience with Microcontrollers but I love it alot so I really hope to get some help! ;D

Not knowing what your hardware looks like but you need something like:
(pseudo code, to get an idea)

char password[] = "1223334444";
char try[20];

void setup()
{
  // initialize things for the motor's
}

loop()
{
  int count = 0;
  do 
  {
     char c = readkey();
     if (c == '#') break;
     try[count++] = c;
   } while (count < 20);
  
  if (strcmp(try, password) == 0)
  {
     // open sesame
  }
}

I have a non-matrix keypad that is basicly just 12 buttons that look like a Matrix keypad.

How many wires does this non-matrix keypad have?

If they have no wire connected this may be a nice way to connect them - http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1293754239#5 ?

So yeah. It's just a lot of button that looks like a Matrix :stuck_out_tongue:

A program, with design notes, suitable for use with that keypad is now available online at....

The program is simple, and should be easy to adapt for various needs. Let me know what you think, BY PRIVATE MESSAGE, if your comment isn't of much use to other forum users?