Introduction: Simple Arduino Virtual Keypad

Hello i just  created this simple keypad to unlock doors or do some other stuff
requirements:
computer(any os)
arduino
optional for building relay switch
relay 5v
diode 1n4007
resistor 270 ohm
optocoupler 
external supply

Step 1: Bulding Relay Switch

Step 2: Upload Code to Arduino

char inData[20];
char inChar=-1;
byte index = 0;

void setup(){

  Serial.begin(9600);
  pinMode(12, OUTPUT);
}





char Comp(char* This){

  while(Serial.available() > 0)

  {
    if(index < 19)
    {
      inChar = Serial.read();
      inData[index] = inChar;
      index++;
      inData[index] = '\0';
    }
  }

  if(strcmp(inData,This)  == 0){
    for(int i=0;i<19;i++){
      inData[i]=0;
    }
    index=0;
    return(0);

  }
  else{
    return(1);


  }
}


void loop()
{
  if(Comp("6729")==0){
    Serial.write("GRANTED");
    digitalWrite(12,HIGH);
    delay(50000);
    digitalWrite(12, LOW);
          }



}

Step 3: Changing Password

if you want more than 19 digits just change "char inData[20];"to number you need and all 19 to your number-1

Step 4: Run Arduino Virtual Keypad

now all you need to do is unpack ziped files and open (for windows)application.windows32 and run sketch_130540a.exe