WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.600 --> 00:00:10.400
Welcome back to the rfyd NFC section. And

1
00:00:10.400 --> 00:00:13.900
 this is video number 2.4. We're going to read the

2
00:00:13.900 --> 00:00:17.400
 RFID NFC tag using pn532

3
00:00:16.400 --> 00:00:18.800
 module. Okay.

4
00:00:20.200 --> 00:00:22.700
So firstly we will talk about that module.

5
00:00:23.400 --> 00:00:24.000
we have

6
00:00:25.300 --> 00:00:29.000
two options to attach that card with the board. First

7
00:00:28.300 --> 00:00:31.000
 one is this is the SPI and this is

8
00:00:31.200 --> 00:00:35.200
 the i2c where we have just four pins,

9
00:00:34.200 --> 00:00:38.500
 which is ground VCC SDA

10
00:00:37.500 --> 00:00:40.400
 and scl. So

11
00:00:40.400 --> 00:00:42.800
 I'm going to use that one but before moving on

12
00:00:43.600 --> 00:00:47.100
By default, you're both jumpers are

13
00:00:46.100 --> 00:00:49.400
 at that point. So you need to

14
00:00:51.700 --> 00:00:54.400
push that switch to make it

15
00:00:54.400 --> 00:00:57.400
 on for i2c interface and

16
00:00:57.400 --> 00:01:00.400
 it looks like that you don't need

17
00:01:00.400 --> 00:01:03.200
 to touch that. Okay, and after that.

18
00:01:04.400 --> 00:01:06.700
I will put these jumper cables.

19
00:01:07.700 --> 00:01:08.300
into that

20
00:01:09.300 --> 00:01:11.400
We're first one is the ground.

21
00:01:12.700 --> 00:01:15.500
I think I need to just make it little bit Zoom.

22
00:01:16.400 --> 00:01:18.400
to get some cleaner

23
00:01:20.200 --> 00:01:23.600
Yeah, now it's good to go. So firstly yellow will

24
00:01:23.600 --> 00:01:24.300
 go to the ground.

25
00:01:25.300 --> 00:01:26.600
and you can also

26
00:01:27.900 --> 00:01:31.200
see in the diagram that yellow is

27
00:01:30.200 --> 00:01:33.200
 going to the ground and the VCC which

28
00:01:33.200 --> 00:01:36.800
 is red going to the 5 volt and the STA is

29
00:01:36.800 --> 00:01:39.100
 going to the D2 and the SEL is

30
00:01:39.100 --> 00:01:42.400
 going to the T1. I display it in the both form

31
00:01:42.400 --> 00:01:45.500
 in the tabular as well as in the diagrammatical format. So

32
00:01:45.500 --> 00:01:48.300
 you can easily understand in the video while doing all the stuff.

33
00:01:48.300 --> 00:01:51.300
 So this orange cable goes to

34
00:01:51.300 --> 00:01:54.600
 the VCC which is actually five fold and

35
00:01:54.600 --> 00:01:57.400
 that red cable go to

36
00:01:57.400 --> 00:01:58.500
 the SDA.

37
00:02:00.800 --> 00:02:03.200
And that front cable go

38
00:02:03.200 --> 00:02:06.500
 to the scl. Okay. Now we are

39
00:02:06.500 --> 00:02:10.000
 good to go with that. And where is

40
00:02:09.200 --> 00:02:10.400
 our board?

41
00:02:12.200 --> 00:02:15.200
So firstly I need to connect that yellow cable, which is

42
00:02:15.200 --> 00:02:19.400
 to the ground and here we have a ground if

43
00:02:18.400 --> 00:02:20.000
 you see here.

44
00:02:21.200 --> 00:02:22.400
This is the ground.

45
00:02:23.200 --> 00:02:23.800
I'm going to

46
00:02:25.900 --> 00:02:26.900
push that PIN

47
00:02:28.700 --> 00:02:31.000
here and the orange one is

48
00:02:32.100 --> 00:02:34.500
VCC which is going to move to the

49
00:02:35.600 --> 00:02:36.900
5 volt okay.

50
00:02:39.400 --> 00:02:42.400
You can easily figure out that okay, and then

51
00:02:42.400 --> 00:02:45.300
 now red is SDA and the

52
00:02:45.300 --> 00:02:47.500
 SDA goes to the D2.

53
00:02:48.200 --> 00:02:51.300
And this is our D2 cable, okay.

54
00:02:52.800 --> 00:02:55.800
D2 pin sorry, and that brown

55
00:02:55.800 --> 00:02:57.600
 is the scl and it will

56
00:02:58.700 --> 00:03:01.200
go to the D1 and now we are.

57
00:03:02.100 --> 00:03:03.400
good to go with our

58
00:03:04.600 --> 00:03:05.200
setup and

59
00:03:06.400 --> 00:03:09.000
Remember one thing in the esp32. We have

60
00:03:09.400 --> 00:03:12.700
 only 3.3 volt and it requires five

61
00:03:12.700 --> 00:03:15.600
 volt to properly work. Actually I

62
00:03:15.600 --> 00:03:18.100
 tested with the esp32 but it's not giving the

63
00:03:18.100 --> 00:03:20.200
 proper result. That's why I choose that.

64
00:03:21.500 --> 00:03:24.300
We must D1 mini. The main reason

65
00:03:24.300 --> 00:03:27.700
 is that it's a small and it looks very awesome. And the

66
00:03:27.700 --> 00:03:30.600
 other reason is that it Sports the 5 volt and

67
00:03:30.600 --> 00:03:33.500
 esp32 didn't provide the 5 volt

68
00:03:33.500 --> 00:03:36.400
 but you can use an external power to power up

69
00:03:36.400 --> 00:03:39.300
 that module. But with the Arduino it

70
00:03:39.300 --> 00:03:42.200
 works good to go. So this is our

71
00:03:42.200 --> 00:03:45.500
 setup and in the next part in the same video.

72
00:03:45.500 --> 00:03:48.800
 We're going to code and test and verify

73
00:03:48.800 --> 00:03:51.000
 all the stuff. So guys. See you in a next part.

74
00:03:55.300 --> 00:03:58.500
Hello, everyone. I hope you are fine and welcome to the part 2

75
00:03:58.500 --> 00:04:01.000
 of that video in this card. We are going to

76
00:04:01.500 --> 00:04:04.300
 code the development board so we can read the RFID and

77
00:04:04.300 --> 00:04:08.100
 NFC tags. So let's get started with that. Okay, firstly

78
00:04:07.100 --> 00:04:10.900
 before we move on we need to install the

79
00:04:10.900 --> 00:04:13.900
 libraries for the pn532. Actually

80
00:04:13.900 --> 00:04:16.300
 there are different pn532 modules.

81
00:04:17.300 --> 00:04:20.500
Which is developed by Adafruit and Seed Studio

82
00:04:20.500 --> 00:04:23.400
 and the Chinese version right now. We are using the Chinese version.

83
00:04:24.400 --> 00:04:27.700
So just click on that browser and navigate

84
00:04:27.700 --> 00:04:30.700
 to the GitHub. Alco's slash

85
00:04:30.700 --> 00:04:34.500
 pn532. This is the URL. Okay,

86
00:04:33.500 --> 00:04:36.400
 and you can

87
00:04:36.400 --> 00:04:40.700
 download the library for that NFC Reader.

88
00:04:39.700 --> 00:04:42.100
 Just click on the

89
00:04:42.100 --> 00:04:44.500
 code and click on download zip.

90
00:04:47.200 --> 00:04:49.800
And we have that folder here.

91
00:04:50.600 --> 00:04:52.500
Okay, click on extract

92
00:04:56.600 --> 00:04:59.700
and we have a libraries copy that

93
00:05:00.600 --> 00:05:03.800
and we need to put into the library folder

94
00:05:03.800 --> 00:05:06.500
 Arduino Library folder. So in Windows

95
00:05:06.500 --> 00:05:08.400
 it's location is documents.

96
00:05:10.800 --> 00:05:13.500
Arduino libraries and

97
00:05:13.500 --> 00:05:14.900
 click on the paste

98
00:05:16.600 --> 00:05:19.300
your place that because already I have that folder and

99
00:05:19.300 --> 00:05:20.600
 for you guys I deleted that okay.

100
00:05:21.400 --> 00:05:24.400
so now we need to restart the Arduino ID

101
00:05:24.400 --> 00:05:25.300
 so we can

102
00:05:26.500 --> 00:05:28.400
get the libraries in the system.

103
00:05:41.100 --> 00:05:44.000
So guys click on that file examples.

104
00:05:44.700 --> 00:05:45.000
and

105
00:05:49.700 --> 00:05:51.600
here we have pn532.

106
00:05:52.400 --> 00:05:57.300
Examples. So click on the iso 1443a underscore,

107
00:05:56.300 --> 00:05:58.500
 uid. It's an easy.

108
00:05:59.900 --> 00:06:00.200
Okay.

109
00:06:01.800 --> 00:06:04.500
So just click on the tools

110
00:06:04.500 --> 00:06:07.400
 and select the board. We have already selected our board,

111
00:06:07.400 --> 00:06:10.100
 which is the vmos D1 meaning.

112
00:06:10.900 --> 00:06:12.800
You can select that option. Okay?

113
00:06:13.600 --> 00:06:13.900
and

114
00:06:16.700 --> 00:06:19.400
click on the ports and our board

115
00:06:19.400 --> 00:06:20.800
 is a Comm 7 Port, okay.

116
00:06:21.600 --> 00:06:24.300
Just click on that upload.

117
00:06:26.500 --> 00:06:28.400
Now code is uploading to the board.

118
00:06:29.300 --> 00:06:31.600
You can see the progress from there.

119
00:06:33.400 --> 00:06:36.800
And we are good to go with that. Okay, click on the serial monitor.

120
00:06:36.800 --> 00:06:39.300
 Okay, so it says I didn't find

121
00:06:39.300 --> 00:06:41.000
 the module. Okay, just

122
00:06:42.100 --> 00:06:44.400
Unplug that one cable and put it back.

123
00:06:45.700 --> 00:06:49.100
And you will see here waiting for an iso card.

124
00:06:48.100 --> 00:06:52.800
 Okay. Now we are ready with that just place

125
00:06:51.800 --> 00:06:54.200
 the tag and now we

126
00:06:54.200 --> 00:06:57.600
 are good to go with that. Okay, just need to put another tag.

127
00:06:58.900 --> 00:07:01.500
To verify the values. Okay. So all

128
00:07:01.500 --> 00:07:04.800
 of these values are in hexa, so we

129
00:07:04.800 --> 00:07:06.900
 need these values in a string so

130
00:07:08.200 --> 00:07:11.500
We need to find the code so firstly here. We need to define a

131
00:07:11.500 --> 00:07:12.100
 string variable.

132
00:07:16.600 --> 00:07:17.600
uid value

133
00:07:18.300 --> 00:07:21.400
and then we need to concatenate that

134
00:07:21.400 --> 00:07:23.300
 while using to that variable.

135
00:07:36.300 --> 00:07:38.400
And Below, we need to print that value.

136
00:07:56.900 --> 00:07:57.900
click on upload

137
00:08:05.700 --> 00:08:06.000
here

138
00:08:07.900 --> 00:08:10.500
and here you will see that this

139
00:08:10.500 --> 00:08:13.700
 is the hexadecimal value and this is the value in a

140
00:08:13.700 --> 00:08:16.900
 string 3 3 C 5

141
00:08:16.900 --> 00:08:19.800
 9 and this is the a okay. And what's

142
00:08:19.800 --> 00:08:21.600
 the value of that tag?

143
00:08:24.300 --> 00:08:27.600
A3 f a three one day

144
00:08:27.600 --> 00:08:30.800
 so guys and this video. We just uploaded

145
00:08:30.800 --> 00:08:33.400
 the code firstly we install the library for the

146
00:08:33.400 --> 00:08:36.300
 pn532 and then we use the example code

147
00:08:36.300 --> 00:08:39.400
 to Wi-Fi, and we tested that how we can read

148
00:08:39.400 --> 00:08:42.100
 the car and then we converted that

149
00:08:42.100 --> 00:08:45.700
 uid value into the string for for the usage. So

150
00:08:45.700 --> 00:08:48.400
 in the next video, we're going to develop a system

151
00:08:48.400 --> 00:08:51.300
 where we will attach our lock with a specific

152
00:08:51.300 --> 00:08:54.600
 card, and when that card will we

153
00:08:54.600 --> 00:08:57.700
 near to the rfided the lock will be open else?

154
00:08:57.700 --> 00:09:00.400
 It will not be open on the other card. So guys see

155
00:09:00.400 --> 00:09:02.700
 you in the next video. Have a good day. Bye.
