- #include <LiquidCrystal.h>
- #include <EEPROM.h>
- #include <SPI.h>
- #include <MFRC522.h>
- /* * Signal Pin Pin Pin
- * Arduino Uno Arduino Mega MFRC522 board
- * ------------------------------------------------------------
- * Reset 9 5 RST
- * SPI SS 10 53 SDA
- * SPI MOSI 11 52 MOSI
- * SPI MISO 12 51 MISO
- * SPI SCK 13 50 SCK
- *
- * Hardware required:
- * Arduino
- * PCD (Proximity Coupling Device): NXP MFRC522 Contactless Reader IC
- * PICC (Proximity Integrated Circuit Card): A card or tag using the ISO 14443A interface, eg Mifare or NTAG203.
- * The reader can be found on eBay for around 5 dollars. Search for "mf-rc522" on ebay.com.
- */
- #define SS_PIN 10 //Arduino Uno
- #define RST_PIN 9
- MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
- const byte Buzzer=15;
- const byte InitialPin=17;
- const byte LockOut=16;
- const byte LCD_LT=8;
- byte In_Data,Receive_Data[4],EEPROM_data[8],RFID_SN[4],RFID_PW[4];
- //
- int KeyIn,CardCount,CardNumber;
- byte KeyNum,PW_Error;
- unsigned long Wait_Time;
- const int keyValue[]={1000,800,670,500,440,390,325,305,280,245,230,215,190,160,135,110};
- const byte keyNumbers[]={1,14,7,2,0,8,3,15,9,10,13,12,4,5,6,11};
- const char keyChar[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
- byte keyNumber;
- // LCD Pins : RS EN D4 D5 D6 D7
- LiquidCrystal lcd(3,2,7,6,5,4);
- const int numRows=2;
- const int numCols=20;
- String inputString = ""; // a string to hold incoming data
- boolean stringComplete = false,equal,flag; // whether the string is complete
- //
- void setup()
- {
- pinMode(LockOut,OUTPUT);
- pinMode(LCD_LT,OUTPUT);
- pinMode(Buzzer,OUTPUT);
- digitalWrite(Buzzer,1);
- digitalWrite(LCD_LT,0);
- lcd.begin(numCols,numRows);
- LCD_Clear_Line(0);
- lcd.setCursor(4,0);
- lcd.print("Power Test..");
- BuzzerSound(100);
- // lcd.setCursor(0,1);
- lcd.blink();
- LCD_Clear_Line(1);
- for (int i=0;i<10;i++)
- {
- lcd.setCursor(i,1);
- lcd.print(i);
- delay(100);
- }
- for (int i=0;i<10;i++)
- {
- lcd.setCursor(i+10,1);
- lcd.print(i);
- delay(100);
- }
- for (int i=0;i<10;i++)
- {
- lcd.setCursor(i,0);
- lcd.print(i);
- delay(100);
- }
- for (int i=0;i<10;i++)
- {
- lcd.setCursor(i+10,0);
- lcd.print(i);
- delay(100);
- }
- SPI.begin(); // Init SPI bus
- mfrc522.PCD_Init(); // Init MFRC522 card
- Serial.begin(9600);
- Serial.println("Start...");
- // inputString.reserve(50);
- delay(1000);
- BuzzerSound(500);
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("Module TP: RC522");
- delay(1000);
- if(digitalRead(InitialPin)==0)
- Initial_System();
- }
- //
- void loop()
- {
- Start:
- BeeBee();
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("RFID Security Sys.");
- LCD_Clear_Line(1);
- lcd.setCursor(4,1);
- lcd.print("MUST-2014A");
- delay(1000);
- digitalWrite(LCD_LT,1);
- //
- // Look for new cards
- while( ! mfrc522.PICC_IsNewCardPresent())
- {};
- digitalWrite(LCD_LT,0);
- if(Read_RFID_SN()==true)
- {
- BuzzerSound(100);
- if(!Check_Card_Exist())
- {
- lcd.setCursor(17,1);
- lcd.print(".");
- delay(500);
- lcd.print(".");
- delay(1000);
- lcd.setCursor(17,1);
- lcd.print(" ");
- }
- else
- {
- LCD_Clear_Line(0);
- lcd.setCursor(2,0);
- lcd.print("Card Number:");
- if(CardNumber<10)
- lcd.print("0");
- lcd.print(CardNumber);
- PW_Error=3;
- do
- {
- if(Password_In()==false) break;
- // {
- if(KeyNum==12) break;
- // goto Start;
- delay(100);
- equal=true;
- for(byte i=0;i<4;i++)
- {
- Serial.print(RFID_PW[i],HEX);
- Serial.print(",");
- Serial.println(EEPROM_data[i+4],HEX);
- if(RFID_PW[i]!=EEPROM_data[i+4])
- equal=false;
- }
- if(equal)
- {
- if(CardNumber!=1)
- {
- LCD_Clear_Line(1);
- lcd.setCursor(3,1);
- lcd.print("Gate Open!");
- digitalWrite(LockOut,1);
- BeeBee();
- delay(1000);
- digitalWrite(LockOut,0);
- break;
- }
- else
- {
- do
- {
- Master_Card:
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("1.Open Gate");
- LCD_Clear_Line(1);
- lcd.setCursor(1,1);
- lcd.print("2.Card Management");
- if((WaitKeyIn(10)==false)||(KeyNum==12))
- goto Start;
- if(KeyNum==1)
- {
- LCD_Clear_Line(1);
- lcd.setCursor(3,1);
- lcd.print("Gate Open!");
- digitalWrite(LockOut,1);
- BeeBee();
- delay(1000);
- digitalWrite(LockOut,0);
- goto Start;
- }
- if(KeyNum==2)
- {
- Card_Management:
- LCD_Clear_Line(0);
- lcd.setCursor(0,0);
- lcd.print("1.Add 2.Del. Card");
- LCD_Clear_Line(1);
- lcd.setCursor(0,1);
- lcd.print("3.Chg. PW 4.Init All");
- BeeBee();
- if((WaitKeyIn(10)==false)||(KeyNum==12))
- goto Master_Card;
- Serial.println(KeyNum);
- if(KeyNum==1)
- {
- if(AddCard()==false)
- {
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("1.Add Card ");
- LCD_Clear_Line(1);
- lcd.setCursor(3,1);
- lcd.print("function end...");
- BeeBee();
- WaitKeyIn(2);
- goto Card_Management;
- }
- }
- if(KeyNum==2)
- {
- if(DelCard()==false)
- {
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("2.Delete Card ");
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("function end...");
- BeeBee();
- WaitKeyIn(2);
- goto Card_Management;
- }
- }
- if(KeyNum==3)
- {
- if(ChangePW()==false)
- {
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("3.Change PW.");
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("function end...");
- BeeBee();
- WaitKeyIn(2);
- goto Card_Management;
- }
- }
- if(KeyNum==4)
- {
- if(Initial_All()==false)
- {
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("4.Initial All");
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("function end...");
- BeeBee();
- WaitKeyIn(2);
- goto Card_Management;
- }
- }
- BeeBee();
- }
- delay(1000);
- // break;
- } while(1);
- BeeBee();
- }
- }
- else
- {
- LCD_Clear_Line(1);
- lcd.setCursor(1,1);
- lcd.print("Password Error!");
- PW_Error--;
- BeeBee();
- delay(1500);
- }
- } while(PW_Error>0);
- if(PW_Error==0)
- {
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("System Hold 10 Min!");
- BeeBee();
- delay(600000);
- }
- }
- }
- else
- {
- LCD_Clear_Line(1);
- lcd.setCursor(3,1);
- lcd.print("RFID Read Error!");
- BeeBee();
- // Look for new cards
- while( mfrc522.PICC_IsNewCardPresent())
- {};
- }
- delay(100);
- mfrc522.PICC_HaltA(); // Halt PICC
- mfrc522.PCD_StopCrypto1(); // Stop encryption on PCD
- delay(1000);
- //
- }
- //
- boolean AddCard()
- {
- Wait_RFID_Card:
- LCD_Clear_Line(0);
- LCD_Clear_Line(1);
- CardCount=EEPROM.read(0);
- if(CardCount==100)
- {
- lcd.setCursor(2,0);
- lcd.print("Card Number=100");
- lcd.setCursor(1,1);
- lcd.print("Sorry Cards Full!");
- WaitKeyIn(10);
- return(false);
- }
- lcd.setCursor(1,0);
- lcd.print("Place New Card on");
- lcd.setCursor(2,1);
- lcd.print("RFID Reader....");
- WaitKeyRelease();
- flag=true;
- Wait_Time=millis();
- while( ! mfrc522.PICC_IsNewCardPresent())
- {
- if(((millis()-Wait_Time)>=10000)||(keyPress()==true))
- {
- flag=false;
- BeeBee();
- return(false);
- }
- }
- if(flag==true)
- {
- if(Read_RFID_SN()==false)
- {
- LCD_Clear_Line(1);
- lcd.setCursor(3,1);
- lcd.print("Setting Error!");
- BeeBee();
- exit;
- }
- else
- {
- LCD_Clear_Line(0);
- LCD_Clear_Line(1);
- lcd.setCursor(2,0);
- lcd.print("Card SN:");
- Show_RFID_SN();
- if(Check_Card_Exist())
- {
- lcd.setCursor(1,1);
- lcd.print("Card Already Exist!");
- BeeBee();
- WaitKeyIn(10);
- goto Wait_RFID_Card;
- }
- if(Password_In()==true)
- {
- if(KeyNum==12)
- goto Wait_RFID_Card;
- if(Accept_Cancel()==false)
- return(false);
- if(KeyNum==12)
- goto Wait_RFID_Card;
- CardCount=EEPROM.read(0);
- CardCount++;
- for(byte j=0;j<4;j++)
- {
- EEPROM_data[j]=RFID_SN[j];
- Serial.print(EEPROM_data[j],HEX);
- }
- Serial.println();
- for(byte j=4;j<8;j++)
- {
- EEPROM_data[j]=RFID_PW[j-4];
- Serial.print(EEPROM_data[j],HEX);
- }
- if(Save_Check_EEPROM(CardCount*8,EEPROM_data)==true)
- {
- LCD_Clear_Line(0);
- lcd.setCursor(2,0);
- lcd.print("Card Number=");
- if(CardCount<10)
- lcd.print("0");
- lcd.print(CardCount);
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("New Card Saved!");
- EEPROM.write(0,CardCount);
- BeeBee();
- delay(1000);
- LCD_Clear_Line(0);
- lcd.setCursor(2,0);
- lcd.print("Press any key ..");
- WaitKeyIn(10);
- if(KeyNum==12)
- return(true);
- goto Wait_RFID_Card;
- }
- }
- /* else
- {
- if(KeyNum==12)
- goto Wait_RFID_Card;
- }
- */ }
- }
- }
- //
- boolean DelCard()
- {
- int NumDigital,CardNum;
- Delete_Card:
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("2.Delete Card ");
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("Card Number:");
- BeeBee();
- CardNum=0;
- NumDigital=0;
- do
- {
- Input_Card_Num:
- if((WaitKeyIn(10)==false)||(KeyNum==12))
- return(false);
- if(KeyNum==15)
- {
- if(NumDigital==0)
- return(false);
- else
- goto Card_Num_End;
- }
- if((KeyNum>9))
- {
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("Illegal Input!!");
- BeeBee();
- delay(1500);
- LCD_Clear_Line(1);
- lcd.setCursor(13+NumDigital,0);
- goto Input_Card_Num;
- }
- lcd.print(KeyNum);
- CardNum=CardNum*10+KeyNum;
- NumDigital++;
- Serial.println(NumDigital);
- } while(NumDigital<3);
- Card_Num_End:
- Serial.println(CardNum);
- Serial.println("CardNum Input end!");
- CardCount=EEPROM.read(0);
- Serial.println(CardCount);
- if(CardNum==0)
- {
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("Card Number Error!");
- BeeBee();
- delay(2000);
- goto Delete_Card;
- }
- if(CardNum==1)
- {
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("Is Master Card!");
- BeeBee();
- delay(2000);
- goto Delete_Card;
- }
- if(CardNum>CardCount)
- {
- LCD_Clear_Line(1);
- lcd.setCursor(0,1);
- lcd.print("Card number too big!");
- BeeBee();
- delay(2000);
- goto Delete_Card;
- }
- if(CardNum==CardCount)
- goto Dec_Card_Count;
- for(byte j=0;j<8;j++)
- {
- EEPROM_data[j]=EEPROM.read(CardCount*8+j);
- EEPROM.write(CardNum*8+j,EEPROM_data[j]);
- }
- Dec_Card_Count:
- CardCount--;
- Serial.println(CardCount);
- EEPROM.write(0,CardCount);
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("Card ");
- lcd.print(CardNum);
- lcd.print(" been Del.!");
- BeeBee();
- delay(2000);
- goto Delete_Card;
- WaitKeyIn(0);
- return(false);
- }
- //
- boolean ChangePW()
- {
- int NumDigital,CardNum;
- Change_Password:
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("3.Change PW.");
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("Card Number:");
- BeeBee();
- CardNum=0;
- NumDigital=0;
- do
- {
- Input_Card_Num:
- if((WaitKeyIn(10)==false)||(KeyNum==12))
- return(false);
- Serial.println(KeyNum);
- if(KeyNum==15)
- {
- if(NumDigital==0)
- return(false);
- else
- goto Card_Num_End;
- }
- if((KeyNum>9))
- {
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("Illegal Input!!");
- BeeBee();
- delay(1500);
- LCD_Clear_Line(1);
- lcd.setCursor(13+NumDigital,0);
- goto Input_Card_Num;
- }
- lcd.print(KeyNum);
- CardNum=CardNum*10+KeyNum;
- NumDigital++;
- Serial.println(NumDigital);
- } while(NumDigital<3);
- Card_Num_End:
- CardCount=EEPROM.read(0);
- Serial.println(CardCount);
- if(CardNum>CardCount)
- {
- LCD_Clear_Line(1);
- lcd.setCursor(0,1);
- lcd.print("Input Numbe Over!");
- BeeBee();
- delay(2000);
- goto Change_Password;
- }
- New_Password_In:
- if(Password_In()==false)
- return(false);
- else
- {
- if(KeyNum==12)
- goto New_Password_In;
- if(Accept_Cancel()==false)
- return(false);
- else
- {
- if(KeyNum==12)
- goto Change_Password;
- for(byte i=0;i<4;i++)
- {
- Serial.print(RFID_PW[i]);
- EEPROM.write(CardNum*8+4+i,RFID_PW[i]);
- }
- Serial.println();
- Serial.println("New Password Saved!");
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("New Password Saved!");
- BeeBee();
- delay(1500);
- goto Change_Password;
- }
- }
- }
- //
- boolean Initial_All()
- {
- BeeBee();
- LCD_Clear_Line(0);
- lcd.setCursor(0,0);
- lcd.print("4.Initial All");
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("Are you sure?!");
- delay(1500);
- BeeBee();
- if(Accept_Cancel()==true)
- {
- if(KeyNum==10)
- {
- EEPROM.write(0,1);
- LCD_Clear_Line(0);
- lcd.setCursor(0,0);
- lcd.print("4.Initial All");
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("Job done!");
- BeeBee();
- delay(1500);
- return(false);
- }
- }
- return(false);
- }
- //
- boolean Initial_System()
- {
- BeeBee();
- LCD_Clear_Line(0);
- lcd.setCursor(0,0);
- lcd.print("Master Card Setting.");
- LCD_Clear_Line(1);
- lcd.setCursor(2,1);
- lcd.print("Please Process...");
- while( ! mfrc522.PICC_IsNewCardPresent())
- {};
- if(Read_RFID_SN()==false)
- {
- LCD_Clear_Line(1);
- lcd.setCursor(3,1);
- lcd.print("Read UID Error!");
- BeeBee();
- delay(2000);
- return(false);
- }
- else
- {
- LCD_Clear_Line(0);
- lcd.setCursor(2,0);
- lcd.print("Card SN:");
- Show_RFID_SN();
- LCD_Clear_Line(1);
- for(byte i=4;i<8;i++)
- EEPROM_data[i]=i-3;
- if(Save_Check_EEPROM(8,EEPROM_data)==true)
- {
- lcd.setCursor(4,1);
- lcd.print("Setting OK!");
- delay(2000);
- }
- else
- {
- lcd.setCursor(0,1);
- lcd.print("Master SN Write Err!");
- BeeBee();
- BeeBee();
- delay(2000);
- return(false);
- }
- BeeBee();
- }
- while( mfrc522.PICC_IsNewCardPresent())
- {};
- LCD_Clear_Line(0);
- lcd.setCursor(0,0);
- lcd.print("1.Keep Card Setting.");
- LCD_Clear_Line(1);
- lcd.setCursor(0,1);
- lcd.print("2.Initial All");
- do
- {
- if(WaitKeyIn(10)==true)
- {
- if(KeyNum==1)
- break;
- if(KeyNum==2)
- {
- EEPROM.write(0,1);
- break;
- }
- BeeBee();
- }
- } while(1);
- LCD_Clear_Line(0);
- lcd.setCursor(1,0);
- lcd.print("System Initial OK!");
- delay(2000);
- }
- //
- boolean Password_In()
- {
- LCD_Clear_Line(1);
- lcd.setCursor(3,1);
- lcd.print("Password:");
- BuzzerSound(300);
- for(byte i=0;i<4;i++)
- {
- do
- {
- flag=WaitKeyIn(10);
- } while(!((KeyNum==12)||((KeyNum<10))));
- if(flag==false)
- return(false);
- if(KeyNum==12)
- return(true);
- RFID_PW[i]=KeyNum;
- lcd.print(KeyNum,HEX);
- }
- return(true);
- }
- //
- boolean Accept_Cancel()
- {
- LCD_Clear_Line(0);
- lcd.setCursor(0,0);
- lcd.print("A-Accept C-Cancel:");
- do
- {
- if(WaitKeyIn(10)==false)
- return(false);
- else if((KeyNum==10)||(KeyNum==12))
- break;
- else
- BeeBee();
- } while(1);
- return(true);
- }
- //
- boolean WaitKeyIn(byte wait)
- {
- WaitKeyRelease();
- Wait_Time=millis();
- while(!keyPress())
- {
- if(wait!=0)
- {
- if((millis()-Wait_Time)>=(wait*1000))
- return(false);
- }
- }
- delay(20);
- KeyNum=findKeyNumber();
- BuzzerSound(100);
- return(true);
- }
- //
- void WaitKeyRelease()
- {
- while(keyPress())
- {}
- delay(30);
- }
- //
- boolean Check_Card_Exist()
- {
- CardCount=EEPROM.read(0);
- Serial.println(CardCount);
- for(int i=0;i<CardCount;i++)
- {
- for(byte j=0;j<8;j++)
- EEPROM_data[j]=EEPROM.read(i*8+8+j);
- equal=true;
- for(byte j=0;j<4;j++)
- {
- Serial.print(EEPROM_data[j],HEX);
- Serial.print(",");
- Serial.println(RFID_SN[j],HEX);
- if(EEPROM_data[j]!=RFID_SN[j])
- equal=false;
- }
- if(equal)
- {
- CardNumber=i+1;
- return(true);
- }
- }
- return(false);
- }
- //
- boolean Save_Check_EEPROM(int address,byte data[])
- {
- for(byte i=0;i<8;i++)
- EEPROM.write(address+i,data[i]);
- for(byte i=0;i<8;i++)
- {
- byte Echo_Data=EEPROM.read(address+i);
- if(Echo_Data!=data[i])
- {
- Serial.println("Data Error!");
- return(false);
- }
- }
- return(true);
- }
- //
- void Show_RFID_SN()
- {
- for(byte i=0;i<4;i++)
- {
- EEPROM_data[i]=Receive_Data[i];
- if(Receive_Data[i]<0x10)
- lcd.print("0");
- lcd.print(Receive_Data[i],HEX);
- }
- }
- //
- boolean Read_RFID_SN()
- {
- flag=false;
- for(byte j=0;j<5;j++)
- {
- delay(20);
- if ( mfrc522.PICC_ReadCardSerial())
- {
- flag=true;
- break;
- }
- }
- if(flag==false) return(false);
- // Select one of the cards
- Serial.print("Card UID:"); //Dump UID
- for (byte i = 0; i < mfrc522.uid.size; i++) {
- Receive_Data[i]=mfrc522.uid.uidByte[i];
- RFID_SN[i]=Receive_Data[i];
- Serial.print(Receive_Data[i] < 0x10 ? " 0" : " ");
- Serial.print(Receive_Data[i], HEX);
- }
- Serial.print(" PICC type: "); // Dump PICC type
- byte piccType = mfrc522.PICC_GetType(mfrc522.uid.sak);
- Serial.println(mfrc522.PICC_GetTypeName(piccType));
- Serial.println(" ");
- return(true);
- }
- //
- void LCD_Clear_Line(int Line_Num){
- lcd.setCursor(0,Line_Num);
- lcd.print(" ");
- }
- //
- //
- void BeeBee(){
- BuzzerSound(100);
- delay(100);
- BuzzerSound(500);
- }
- //
- void BuzzerSound(int BeeTime){
- for(int i=0;i<BeeTime;i++)
- {
- digitalWrite(Buzzer,0);
- delayMicroseconds(500);
- digitalWrite(Buzzer,1);
- delayMicroseconds(500);
- }
- }
- //
- byte findKeyNumber(){
- delay(10);
- KeyIn=analogRead(A0);
- KeyIn=analogRead(A0);
- // Serial.println(KeyIn);
- for(byte i=0;i<16;i++)
- {
- if(KeyIn>keyValue[i])
- return(keyNumbers[i]) ;
- }
- }
- boolean keyPress(){
- KeyIn=analogRead(A0);
- if(KeyIn>40)
- return(true);
- else
- return(false);
- }
Arduino的繽紛世界
陸、全體程式列表
訂閱:
文章 (Atom)
陸、全體程式列表
#include <LiquidCrystal.h> #include <EEPROM.h> #include <SPI.h> #include <MFRC522.h> /* * Signal Pin ...
-
四.5 RFID/Mifare卡片UID號碼拷貝機設計 ■ 功能與動作 : 本實習在設計一RFID/Mifare卡UID號碼拷貝/複製機 ,當程式啟動時,使用者先將欲拷貝或複製的原始卡片放置在RFID讀寫器/RC522上,等系統成功讀取原來卡片的UID號碼並顯示在LCD上後,...
-
使用Arduino之RFID門禁管制系統 壹、前言 貳、相關知識 二、1 RFID技術推廣與標準制定單位 二、2 RFID所使用之無線電波與頻帶 二、3 RFID系統基本概念 二、4 RFID系統感應方式...
-
#include <LiquidCrystal.h> #include <EEPROM.h> #include <SPI.h> #include <MFRC522.h> /* * Signal Pin ...