So I have been thinking about an arduino door lock for a while. Here's the idea:
The door lock consists of a servo which opens the door if ALL the following stages are passed by the user in order:
1) Correct fingerprint entry 2) RFID 3) password entry on keypad
I have 4x3 keypad, MFRC522 rfid module and a fingerprint sensor.
I need it to work like if fingerprint is authentic , it moves on to the next stage , which is RFID. If the Fingerprint is is unauthentic, the program must break with a warning message displayed on lcd. Similarly, if the RFID is successful, it moves to password entry on keypad test and so on.
I am wondering what will be the logical flow of the program. I used IF-ELSE condition like:
--- IF fingerprint is authentic (TRUE) , THEN proceed to RFID test --- ELSE IF fingerprint is unauthentic (FALSE) , THEN display an error message on the lcd.
But then I realized that this isn't working because my fingerprint sensor keeps checking for a fingerprint after short intervals, say 10 seconds. Now when I put my finger ,the condition only becomes TRUE for 10 seconds and then again it will become FALSE. Using the IF-ELSE condition here means that the program will only proceed to the next stage for 10 seconds and then the program would break giving an error message.
I want some kind of condition which goes like if the condition was TRUE once , proceed to the next stage and do not check fingerprint again.Otherwise the program would break.
Somebody please help me out!