Question: Hello I have project with arduino IDE program that used C language ... Im using Arduino Uno and RFID RC522 to read a card ..
Hello
I have project with arduino IDE program that used C language ... Im using Arduino Uno and RFID RC522 to read a card .. this project work when I scan the card on reader ... So, now I have a code but I need to explaination to know how its work ?
// why we need this library ??
#include //The card_ID[4] used for what ? And why the card write in this method {0x56,0x4d,0x47,0xFF} ?
byte card_ID[4]; byte First_card_ID[4]={0x56,0x4d,0x47,0xFF}; byte i; // why using the Boolean and why its false ? boolean State = false;
Void setup {
Serial.begin(9600); SPI.begin(); mfrc522.PCD_Init(); }
// I need explaining to how this function done step by step
void crd_id(){ for (byte i = 0; i < mfrc522.uid.size; i++) { if(card_ID[i]==First_card_ID[i]){ State=true; } else{ State=false; i=5; } } }
Finally, I want to add another card that can be read card and accepted
Regards,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
