Now, upload the code to your Arduino and open the serial monitor.Īpproximate the card you’ve chosen to give access and you’ll see: In the piece of code above you need to change the if (content.substring(1) = “REPLACE WITH YOUR UID”) and type the UID card you’ve written previously. If (content.substring(1) = "BD 31 15 2B") //change here the UID of the card/cards that you want to give access Serial.println("Approximate your card to the reader.") įor (byte i = 0 i < i++) Serial.begin(9600) // Initiate a serial communication MFRC522 mfrc522(SS_PIN, RST_PIN) // Create MFRC522 instance. Write down your UID card because you’ll need it later. You have 1024 bytes of data storage divided into 16 sectors and each sector is protected by two different keys, A and B. The information is stored in the memory that is divided into segments and blocks as you can see in the previous picture. This is the information that you can read from the card, including the card UID that is highlighted in yellow. Let the reader and the tag closer until all the information is displayed. You should see something like the figure below:Īpproximate the RFID card or the keychain to the reader. This code will be available in your Arduino IDE (after installing the RFID library). Install the RFID library in your Arduino IDEĬaution: You must power this device to 3.3V! CircuitĪfter having the circuit ready, go to File > Examples > MFRC522 > DumpInfo and upload the code.Download the RFID library here created by miguelbalboa.Here’s the library you need for this project: Price: approximately 3$ ( check best price on Maker Advisor).two-way radio transmitter-receiver, the reader, that send a signal to the tag and read its response.Each tag has his own identification (UID). tags attached to the object to be identified, in this example we have a keychain and an electromagnetic card.For example, only the person with the right information on his card is allowed to enter. You can use an RFID system to open a door. RFID is useful to identify people, to make transactions, etc… RFID uses electromagnetic fields to transfer data over short distances. RFID means radio-frequency identification. I’ll do a quick overview of the specifications and demonstrate a project example using an Arduino. This blog post shows a simple example on how to use the MFRC522 RFID reader.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |