Untitled
raw download clone
CPP
views 23
,
size 563 b
void keypadEvent(KeypadEvent eKey){
  switch (keypad.getState()){
    case PRESSED:
  Serial.print("Pressed: ");
  Serial.println(eKey);
  if(eKey>='A' && eKey<='D'){
  switch (eKey){
    case 'A':
    
      if (password.evaluate()){
          Serial.println("Success");
          //Add code to run if it works
      }else{
          Serial.println("Wrong");
          //add code to run if it did not work
      }
      
    }
        
    break;
    case '#': password.reset(); break;
    default: password.append(eKey);
     }
}    
}
close fullscreen
Login or Register to edit or fork this paste. It's free.