miguelbalboa / rfid

Arduino RFID Library for MFRC522
The Unlicense
2.74k stars 1.43k forks source link

Is it possible to add a indoors button to grant acces? #561

Closed avweenen closed 3 years ago

avweenen commented 3 years ago

Is it possble to add a pin for a button so i can open my door from the inside? i am a real newby to C programming and i am stuck now. I am trying for a week. I even tried to add a "or" function. Original code was:

if ( findID(readCard) ) { // If not, see if the card is in the EEPROM Serial.println(F("Welcome, You shall pass")); granted(2000); // Open the door lock for 300 ms

What i tried was:

if ( findID(readCard) || ButtonPin == HIGH ) { // If not, see if the card is in the EEPROM Serial.println(F("Welcome, You shall pass")); granted(2000); // Open the door lock for 300 ms

I can not seem to get the input working to unlock the door. i am really curious what to do. Sorry for the question, i am a absolute noob and want to learn to program. Any help would be apperciated.