Загрузка страницы

RFID Module RC522 Interfacing with Arduino Uno/Mega || RFID Module Arduino Tutorial + Code 2020

RFID Module RC522 Interfacing with Arduino Uno/Mega || RFID Module Arduino Tutorial + Code 2020
Download Code: http://bit.ly/rfidCodes
Download Schematic: http://bit.ly/rfidSchematic
Download Library: http://bit.ly/rfidLibrary
Article:
Hello guys I'm Azhar, and in this video I will show you how to use this RFID module with Arduino. So for this project you will need RFID module this is RFID RC522. I'm here using Arduino mega you can use Arduino uno, and I'm here using an LCD with I squared c (i2c) module for displaying the messages. We will connect the four pins which are SDA, SCK, MOSI and MISO and we will skip the fifth one and we will then connect ground, reset and 3.3 volts pin. So as you can see here I have done the Connections, I have connected the lcd and this RFID module to the Arduino mega. We will read the UID of our tag and cards and then we will read them using this RFID module. I have connected it so here this is the code is actually the example code of this library which is MFRC522 so the code is this one dump info but I have modified it for the lcd. These are the pins of the RFID module so here RST in Arduino uno we will connect RST to pin 9 SDA to 10 MOSI to 11 MISO to 12 and SCK to 13 but in Arduino mega we will connect the RST pin to 5, SDA to pin 53, and MOSI to pin 51, MISO to 50 and SCK to 52 so you can use this module with Arduino uno, mega, nano, micro and pro micro so now let's see the code here I have added these libraries these two are for LCD and these two are for this RFID module so if you are using Arduino uno you will change here these pins this RST pin and SS pin. RST if you are using Arduino uno so you will change it to 9 here and SS to 10 right but here i'm using Arduino mega so I will change it to 53 and to 5 okay so here we have created instances for lcd and RFID module we have initialized the lcd we have begun the serial communication and we have initialized and we have initialized the RFID module so here we will read the card or tag whatever we have so after this we will print the data in the card to the serial and also to the LCD so let's upload the code first we will check our board and the port which it is connected and then we will upload it. So our code is uploaded so we can check the UID of our cards and the tag using this serial monitor. So here we will scan our tag on this RFID sensor. So here you can see the UID 69 CD 70 59 here in the serial monitor you can see here the Card UID which is 69 CD 70 59 so you will note this UID we will use this later. So I have these three cards here you can see and this one tag I have scanned the tag and I have noted the UID now I will scan this card and this is the UID of this card. I will scan another card and this is the UID of this card and i'll scan this last card and this is the UID of this card so now we have got the UID of our cards and tag I will open the another code here. You can see here I have four strings UID 1, UID 2, UID 3 and UID 4 and these are the UIDs of my cards and tag. Right. And after this we have this code so here it will check the UID of the scanned card or tag if it is UID 1 it will print on the serial authorized access and it will print on the LCD Tag 1 and it will print in another line authorized access right. If it is UID 2here okay okay this one. So here if the UID is 2 it will print Tag 2 authorized access if it is UID 3 it will print Tag 3 authorized access and if it is UID 4 it will print Tag 4 authorized access after this if the UID of the scanned card or Tag doesn't matches with any of these four UIDs so it will print access denied and it will print on the LCD unknown after that access denied so as I have four cards. Right. And let's check both the conditions so i'll upload the code and our code is uploaded so here as you can see the LCD says scan Tag so first we'll scan this so it says Tag one authorized access it will say it for three seconds so this was our Tag one now let's scan this one this card that says take three authorized sccess so let's write here 3 okay and i'll scan this one now so this is Tag 2 and let's write here 2.Okay and let's scan this last one and it says access denied so as you can see it says unknown access denied so it means that this is our tag four so in this way you can use this RFID module you can make a lot of projects using this module you can make a door lock you can make an attendance system you can make a lot of IOT projects.
Automatic Water Pump Controller
https://youtu.be/25aWTpxfh00
Home Automation using Arduino
https://youtu.be/bP1ftciWjzs
Home Automation Using Node MCU
https://youtu.be/mZ-k6hOSgtY
Wifi Controlled Robot Car
https://youtu.be/NXN7n70-3qQ
A9/A9G GPRS + GPS module complete tutorial, calling, texting
https://youtu.be/8asYHSHWAC0

Видео RFID Module RC522 Interfacing with Arduino Uno/Mega || RFID Module Arduino Tutorial + Code 2020 канала Azhar Electronics
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
27 сентября 2020 г. 10:27:18
00:10:19
Яндекс.Метрика