Welcome back to the rfyd NFC section. And
this is video number 2.4. We're going to read the
RFID NFC tag using pn532
module. Okay.
So firstly we will talk about that module.
we have
two options to attach that card with the board. First
one is this is the SPI and this is
the i2c where we have just four pins,
which is ground VCC SDA
and scl. So
I'm going to use that one but before moving on
By default, you're both jumpers are
at that point. So you need to
push that switch to make it
on for i2c interface and
it looks like that you don't need
to touch that. Okay, and after that.
I will put these jumper cables.
into that
We're first one is the ground.
I think I need to just make it little bit Zoom.
to get some cleaner
Yeah, now it's good to go. So firstly yellow will
go to the ground.
and you can also
see in the diagram that yellow is
going to the ground and the VCC which
is red going to the 5 volt and the STA is
going to the D2 and the SEL is
going to the T1. I display it in the both form
in the tabular as well as in the diagrammatical format. So
you can easily understand in the video while doing all the stuff.
So this orange cable goes to
the VCC which is actually five fold and
that red cable go to
the SDA.
And that front cable go
to the scl. Okay. Now we are
good to go with that. And where is
our board?
So firstly I need to connect that yellow cable, which is
to the ground and here we have a ground if
you see here.
This is the ground.
I'm going to
push that PIN
here and the orange one is
VCC which is going to move to the
5 volt okay.
You can easily figure out that okay, and then
now red is SDA and the
SDA goes to the D2.
And this is our D2 cable, okay.
D2 pin sorry, and that brown
is the scl and it will
go to the D1 and now we are.
good to go with our
setup and
Remember one thing in the esp32. We have
only 3.3 volt and it requires five
volt to properly work. Actually I
tested with the esp32 but it's not giving the
proper result. That's why I choose that.
We must D1 mini. The main reason
is that it's a small and it looks very awesome. And the
other reason is that it Sports the 5 volt and
esp32 didn't provide the 5 volt
but you can use an external power to power up
that module. But with the Arduino it
works good to go. So this is our
setup and in the next part in the same video.
We're going to code and test and verify
all the stuff. So guys. See you in a next part.
Hello, everyone. I hope you are fine and welcome to the part 2
of that video in this card. We are going to
code the development board so we can read the RFID and
NFC tags. So let's get started with that. Okay, firstly
before we move on we need to install the
libraries for the pn532. Actually
there are different pn532 modules.
Which is developed by Adafruit and Seed Studio
and the Chinese version right now. We are using the Chinese version.
So just click on that browser and navigate
to the GitHub. Alco's slash
pn532. This is the URL. Okay,
and you can
download the library for that NFC Reader.
Just click on the
code and click on download zip.
And we have that folder here.
Okay, click on extract
and we have a libraries copy that
and we need to put into the library folder
Arduino Library folder. So in Windows
it's location is documents.
Arduino libraries and
click on the paste
your place that because already I have that folder and
for you guys I deleted that okay.
so now we need to restart the Arduino ID
so we can
get the libraries in the system.
So guys click on that file examples.
and
here we have pn532.
Examples. So click on the iso 1443a underscore,
uid. It's an easy.
Okay.
So just click on the tools
and select the board. We have already selected our board,
which is the vmos D1 meaning.
You can select that option. Okay?
and
click on the ports and our board
is a Comm 7 Port, okay.
Just click on that upload.
Now code is uploading to the board.
You can see the progress from there.
And we are good to go with that. Okay, click on the serial monitor.
Okay, so it says I didn't find
the module. Okay, just
Unplug that one cable and put it back.
And you will see here waiting for an iso card.
Okay. Now we are ready with that just place
the tag and now we
are good to go with that. Okay, just need to put another tag.
To verify the values. Okay. So all
of these values are in hexa, so we
need these values in a string so
We need to find the code so firstly here. We need to define a
string variable.
uid value
and then we need to concatenate that
while using to that variable.
And Below, we need to print that value.
click on upload
here
and here you will see that this
is the hexadecimal value and this is the value in a
string 3 3 C 5
9 and this is the a okay. And what's
the value of that tag?
A3 f a three one day
so guys and this video. We just uploaded
the code firstly we install the library for the
pn532 and then we use the example code
to Wi-Fi, and we tested that how we can read
the car and then we converted that
uid value into the string for for the usage. So
in the next video, we're going to develop a system
where we will attach our lock with a specific
card, and when that card will we
near to the rfided the lock will be open else?
It will not be open on the other card. So guys see
you in the next video. Have a good day. Bye.