Skip to content

Instantly share code, notes, and snippets.

@ThaiEasyElec
Created July 23, 2019 10:28
Show Gist options
  • Save ThaiEasyElec/9fb9460ee5bafced5f3836ca074b9850 to your computer and use it in GitHub Desktop.
Save ThaiEasyElec/9fb9460ee5bafced5f3836ca074b9850 to your computer and use it in GitHub Desktop.
Home Alarm System
void checkPassword(){ // Function check the password
if (password.evaluate()){
//Add code to run if it works
while(1){
//Serial.println("Success");
fl = 1;
digitalWrite(status_lock, LOW);
digitalWrite(status_unlock, HIGH);
lcd.setCursor(0, 3);
lcd.print(" ** Home Unlock ** ");
keypad.getKey();
Alarm_off();
password.reset();
}
}else{
Serial.println("Wrong");
//add code to run if it did not work
lcd.setCursor(0, 3);
lcd.print("**Password Wrong **");
delay(1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment