1
00:00:00,060 --> 00:00:07,260
So here I have already created a new wireless platform project where we invoked the excessive file that

2
00:00:07,260 --> 00:00:08,090
we have created.

3
00:00:08,730 --> 00:00:09,860
But then we to.

4
00:00:10,170 --> 00:00:15,480
You need to follow the same procedure and then invoke the platform project.

5
00:00:15,510 --> 00:00:18,180
Okay, considering the extensive file that we have generated.

6
00:00:18,540 --> 00:00:25,050
And also, you need to create the application project where we will be invoking the Halliwell's template,

7
00:00:25,080 --> 00:00:25,310
right?

8
00:00:26,690 --> 00:00:32,500
Now, since we have a single IP, and again, we know that X AGP IP, the tribe required is an x GPI

9
00:00:32,600 --> 00:00:34,490
0.8, so we have included that.

10
00:00:34,940 --> 00:00:37,700
And we also included an experimental that's right.

11
00:00:38,030 --> 00:00:44,390
The first step that we follow is to configure our benefit rate to that is initializing up 80 percent.

12
00:00:44,450 --> 00:00:47,710
To do that, we require to structure first 22 config structure.

13
00:00:47,720 --> 00:00:49,730
Then we required an instance structure, right?

14
00:00:50,270 --> 00:00:54,230
So we follow the same procedure where we are calling a lookup config.

15
00:00:54,230 --> 00:00:59,120
So where we fast the device idea that you generate the config structure, right?

16
00:00:59,120 --> 00:01:05,330
So once we have our config structure, so we will be calling CFD initialize where we add instant structure,

17
00:01:05,330 --> 00:01:07,430
config structure and the B side to.

18
00:01:07,430 --> 00:01:12,740
Once you passed this three document to see if she initialize this will return the status of initialization.

19
00:01:13,220 --> 00:01:15,830
Again, we are checking whether the status is equal.

20
00:01:15,830 --> 00:01:17,050
Strix this is Texas.

21
00:01:17,060 --> 00:01:21,170
If that is the case, we'll just be mentioning that device initialization is successful.

22
00:01:21,460 --> 00:01:24,170
Else, we will simply be adding the device in ICSI.

23
00:01:24,320 --> 00:01:24,500
Right.

24
00:01:24,510 --> 00:01:29,990
So this is the similar process that people following the previous example right now we go ahead in a

25
00:01:29,990 --> 00:01:30,710
mean code.

26
00:01:30,830 --> 00:01:35,690
We are calling this function, which is in it right, and they need platform and clean up platform work,

27
00:01:35,690 --> 00:01:40,610
predominantly with an upgrade to this handle all the initialization of a new lock and that we required

28
00:01:40,610 --> 00:01:44,420
because we want to work with the consoles first step.

29
00:01:44,780 --> 00:01:49,220
When we work with that, UPI o is to correctly configure the direction, right?

30
00:01:49,220 --> 00:01:53,250
So if you remember, our first port is where we have our switches, right?

31
00:01:53,270 --> 00:01:56,300
So this should be configured as an input.

32
00:01:56,300 --> 00:01:59,810
Their second channel should be configured as it output, right?

33
00:01:59,810 --> 00:02:00,590
So we go ahead.

34
00:02:01,070 --> 00:02:02,570
And if you explore.

35
00:02:03,750 --> 00:02:05,430
It's Dubai, right?

36
00:02:05,820 --> 00:02:10,470
So here we have a function, do sector direction, right, so this is the function that is used to save

37
00:02:10,470 --> 00:02:11,880
the leader direction here.

38
00:02:11,880 --> 00:02:16,620
We need quite robust things, just structure the chain number and the direction that we want to set

39
00:02:16,660 --> 00:02:17,940
correct as copy this.

40
00:02:18,420 --> 00:02:19,530
Go back to our main quote.

41
00:02:20,920 --> 00:02:27,780
OK, so the first channel is where we have our light switches, so we need to configure them to be input

42
00:02:28,000 --> 00:02:31,270
groups or instance structure for us is truepill.

43
00:02:32,470 --> 00:02:38,620
Then the China number one is where we have a suchith and we want to configure them to be an input.

44
00:02:39,070 --> 00:02:44,290
So if you exclude the functionality of that data protection you sick and the pain as an input.

45
00:02:44,500 --> 00:02:46,180
You need to apply what?

46
00:02:47,150 --> 00:02:47,480
Right.

47
00:02:47,660 --> 00:02:48,710
So we go ahead.

48
00:02:49,780 --> 00:02:54,380
And we will add for once, right?

49
00:02:54,380 --> 00:02:59,590
So Alice, before once will configure, are a little bit phobic to work as an input.

50
00:02:59,590 --> 00:03:00,970
So we are 0x.

51
00:03:01,000 --> 00:03:07,070
And so this basically means we're specifying a number and then hexadecimal format, and this is equivalent

52
00:03:07,090 --> 00:03:08,540
to four binary one, right?

53
00:03:08,890 --> 00:03:12,970
Similarly, Channel two is where we have our L3, right?

54
00:03:12,970 --> 00:03:14,780
So this should be configured as an output.

55
00:03:15,130 --> 00:03:17,380
So to do that, the process is again very simple.

56
00:03:17,380 --> 00:03:20,710
We are going to need to call this function now here only difference.

57
00:03:20,860 --> 00:03:25,590
We need to change the channel number of the China number, it's two and to configure this to be an output,

58
00:03:25,590 --> 00:03:27,120
but we need to add a seat, right?

59
00:03:27,130 --> 00:03:29,590
So this is how you correctly set up the direction.

60
00:03:29,770 --> 00:03:35,440
Now why we have set setup the full, but only because we have only four slides, which are so if you

61
00:03:35,440 --> 00:03:42,070
have the number of switches analytic Greta, then you need to set that many number objects to one or

62
00:03:42,070 --> 00:03:44,800
zero, depending on the direction that you want to set, right?

63
00:03:45,040 --> 00:03:51,010
So once detection is correctly set up now, we will be analyzing the function that will be used to read

64
00:03:51,010 --> 00:03:52,210
the value from a pin, right?

65
00:03:52,240 --> 00:03:59,020
So we have a discrete lead which returns you 32 and then where we need to specify instance structure

66
00:03:59,020 --> 00:03:59,970
and the China number.

67
00:04:00,100 --> 00:04:05,710
So we require to declare a variable of you 32 type that will be holding the switch rather than let it

68
00:04:05,710 --> 00:04:07,600
just go ahead and declare you 32.

69
00:04:07,810 --> 00:04:09,100
This will be switch.

70
00:04:10,690 --> 00:04:11,560
Well, right.

71
00:04:11,890 --> 00:04:14,080
And let me just initialize this to a zero.

72
00:04:14,500 --> 00:04:19,270
Now we'll be continuously reading the value for all mod slopes, which is at an interval of two second

73
00:04:19,270 --> 00:04:19,500
rate.

74
00:04:19,510 --> 00:04:24,240
So to do that, let me just add sleep to at the end, right?

75
00:04:24,730 --> 00:04:31,120
This allows us to read those light hedges at an interval of loose again and then that will be signing

76
00:04:31,120 --> 00:04:32,190
on to an elite rate.

77
00:04:32,500 --> 00:04:39,070
So switch value, OK, this will be equal to the function that we have to do.

78
00:04:39,070 --> 00:04:40,450
That is discretely.

79
00:04:40,870 --> 00:04:41,200
OK.

80
00:04:41,230 --> 00:04:42,490
This required two argument.

81
00:04:42,520 --> 00:04:49,900
First one is an instant structure, which is GPIO in hockey's right, and then we require to specify

82
00:04:49,900 --> 00:04:52,500
the channel so the switches are at China.

83
00:04:52,660 --> 00:04:58,450
But right to this allow us to read the value from the switches and then that value will be sending onto

84
00:04:58,450 --> 00:04:59,160
an LCD, right?

85
00:04:59,170 --> 00:05:01,300
So to do that, we have a discrete right.

86
00:05:01,480 --> 00:05:07,600
Right here, we need to pass an instance structure, China number and value of the data that we want

87
00:05:07,600 --> 00:05:09,010
to send to annually.

88
00:05:09,160 --> 00:05:09,430
Right.

89
00:05:09,790 --> 00:05:16,180
First one is an instance actuar, which is GPIO, the channel where we have our IT two and the value

90
00:05:16,180 --> 00:05:19,400
that we want to send is switch value, right?

91
00:05:19,450 --> 00:05:20,260
This makes sense.

92
00:05:20,680 --> 00:05:23,620
We will also be sending this value on a console.

93
00:05:23,620 --> 00:05:29,630
So as we change the value of the switches, we'll also be seeing the changes on the console, right?

94
00:05:29,650 --> 00:05:35,290
So to do that, we have a printer that could be used to print a fixed point variable rate.

95
00:05:35,290 --> 00:05:35,650
So.

96
00:05:36,600 --> 00:05:40,580
Switch value read, OK.

97
00:05:41,220 --> 00:05:45,210
But things again, do not forget to add a new line, correct?

98
00:05:45,390 --> 00:05:49,400
OK, and the variable that is holding the value of a switches switch, right?

99
00:05:49,470 --> 00:05:49,770
Right.

100
00:05:50,070 --> 00:05:55,320
So what we are doing is we are reading the value from a switch, that value we are writing to and.

101
00:05:55,740 --> 00:05:57,750
We are also sending that on to a console.

102
00:05:57,960 --> 00:06:00,680
And this we are doing in developing second right.

103
00:06:00,690 --> 00:06:06,330
So this computer application now this will be continuously running as we are, we are using a light,

104
00:06:06,570 --> 00:06:06,840
right?

105
00:06:07,140 --> 00:06:11,580
So once you finish your application, you just need to build up an entire application project.

106
00:06:11,610 --> 00:06:11,910
Great.

107
00:06:13,090 --> 00:06:19,240
So this will lead any file that will be executing on an FDA right to finish select an application project,

108
00:06:19,240 --> 00:06:22,150
right click Debug as launch on hardware.

109
00:06:23,520 --> 00:06:23,720
Right.

110
00:06:24,180 --> 00:06:29,970
So once you switch your perspective to a DBA, the next thing that you need to do is to connect the

111
00:06:30,350 --> 00:06:31,380
serial terminal right.

112
00:06:31,430 --> 00:06:35,160
To click on this plus button, select the respect you can put on the border.

113
00:06:35,160 --> 00:06:36,030
Click OK, right?

114
00:06:36,030 --> 00:06:39,600
So once you see this, do this, just go ahead and click on resume.

115
00:06:39,600 --> 00:06:41,990
But right, so you could see a device and it's successful.

116
00:06:42,030 --> 00:06:44,910
So that is this is of our benefit initialization.

117
00:06:45,150 --> 00:06:47,940
And right now you could observe all the switches are in.

118
00:06:47,940 --> 00:06:54,690
And all right, so if I change and unless we switch to one OK or on studio could see the value rate

119
00:06:54,710 --> 00:06:55,650
is gone right.

120
00:06:55,920 --> 00:06:59,840
If I turn on the next switch, you'll be observing the value registry.

121
00:06:59,850 --> 00:07:02,320
If I turn on, the next one will be getting seven.

122
00:07:02,580 --> 00:07:06,170
And if I turn on the last one, you'll be getting the value of 50.

123
00:07:06,320 --> 00:07:06,530
Right.

124
00:07:06,550 --> 00:07:10,560
So this is how you could work around with a dual channel.

125
00:07:10,920 --> 00:07:11,280
OK.

126
00:07:11,520 --> 00:07:15,600
And you could also observe that simultaneously, depending on the switch status.

127
00:07:15,960 --> 00:07:16,320
OK.

128
00:07:16,800 --> 00:07:18,640
Are also turning on off, right?
