1
00:00:00,760 --> 00:00:01,890
Hello, welcome back.

2
00:00:02,440 --> 00:00:11,050
And this lesson, we going to see how to use the task parameters when we created our tasks, we realize

3
00:00:11,050 --> 00:00:13,750
our task functions take arguments.

4
00:00:14,050 --> 00:00:18,880
We're going to see how to use those arguments that the task function takes.

5
00:00:19,340 --> 00:00:23,680
OK, so I'm going to make a copy of our first project task creation over here.

6
00:00:24,190 --> 00:00:25,000
I'll say copy.

7
00:00:28,760 --> 00:00:30,260
And then I'll paste over here.

8
00:00:31,380 --> 00:00:33,090
And I renamed this to number three.

9
00:00:37,400 --> 00:00:38,600
Task Perimeter's.

10
00:00:45,790 --> 00:00:47,050
And I'll see copy.

11
00:00:49,180 --> 00:00:52,330
OK, so this is our project.

12
00:00:53,410 --> 00:01:00,130
So over here may not see, OK, so this is our project with three tasks.

13
00:01:00,970 --> 00:01:10,210
OK, so what I'm going to do here is we going to enable four groups.

14
00:01:10,690 --> 00:01:19,210
We're going to enable four groups on iReport, and then we're going to see how these pins Tokyo when

15
00:01:19,210 --> 00:01:21,690
we place them in respective tasks.

16
00:01:22,570 --> 00:01:28,330
If you have the discovery board, these pins will be connected to the four LEDs on the discovery board.

17
00:01:28,810 --> 00:01:31,060
But if you have the nuclear board, you need not worry.

18
00:01:31,330 --> 00:01:33,940
We're going to observe these pins using the debugger.

19
00:01:33,940 --> 00:01:35,120
We're going to see them together.

20
00:01:35,170 --> 00:01:35,650
You need not.

21
00:01:36,730 --> 00:01:37,150
Right.

22
00:01:37,390 --> 00:01:39,280
But we're going to write the firmware.

23
00:01:39,940 --> 00:01:43,710
So we're going to nominate PD 12, 13, 14 and 15.

24
00:01:43,720 --> 00:01:45,100
These are the pins we will use.

25
00:01:46,300 --> 00:01:53,320
So we already have dysfunction here, down here called all giu in it, so because what we're going to

26
00:01:53,320 --> 00:01:57,990
do is also about you initialization, we're going to put that code in here.

27
00:01:58,600 --> 00:01:59,650
So I'm going to extend this.

28
00:02:00,010 --> 00:02:06,460
What we would do is we would enable clock access to these particular port.

29
00:02:11,990 --> 00:02:19,810
Once that is done, we would reset the pins, its advice to reset the pins before you configure them,

30
00:02:20,240 --> 00:02:24,950
and then we would configure the pins.

31
00:02:27,870 --> 00:02:28,440
And then.

32
00:02:32,710 --> 00:02:39,960
Initialise pins, so these are the four items we need to accomplish here.

33
00:02:40,090 --> 00:02:40,780
Michelle?

34
00:02:44,650 --> 00:02:53,440
OK, so we said access to ports, we're simply going to copy this and then paste this over here, this

35
00:02:53,440 --> 00:02:56,610
time we want port deal so we change HD over here.

36
00:02:56,920 --> 00:03:02,620
So research means research means simply means tender pince of our rights, zero to the peons.

37
00:03:03,010 --> 00:03:06,260
So we're going to use the whole GPA right function.

38
00:03:06,580 --> 00:03:08,440
So this function takes three arguments.

39
00:03:08,440 --> 00:03:10,150
The first argument is the port.

40
00:03:10,480 --> 00:03:12,190
The second argument is the PIN number.

41
00:03:12,430 --> 00:03:14,320
And a third argument is the state.

42
00:03:14,320 --> 00:03:17,770
You want to write to this particular pin at that particular port.

43
00:03:18,470 --> 00:03:20,860
OK, so come over here.

44
00:03:22,330 --> 00:03:23,170
I'll see how.

45
00:03:25,140 --> 00:03:26,220
Are on this cool.

46
00:03:29,780 --> 00:03:41,360
Right in the first argument is G.P.A., the second argument, GP2 Unaskable, Unaskable 12, the third

47
00:03:41,360 --> 00:03:49,020
argument, we want to write zero to it so I can say zero or I can use a micro defined code GPL.

48
00:03:49,050 --> 00:03:51,980
You underscore Pend underscore Racette.

49
00:03:52,250 --> 00:03:53,420
This is the same as zero.

50
00:03:54,340 --> 00:03:59,540
OK, so this function exists in our whole GPL.

51
00:03:59,540 --> 00:04:03,770
You don't eightfold and this GPL you d is already defined.

52
00:04:03,770 --> 00:04:06,530
This pentru is also already defined.

53
00:04:06,560 --> 00:04:09,940
That is why I can simply use these texts.

54
00:04:10,760 --> 00:04:11,140
Right.

55
00:04:11,630 --> 00:04:16,310
So if you want to know whether something is already defined in its existing, if all you Double-Click.

56
00:04:16,700 --> 00:04:18,560
Right click open declaration.

57
00:04:19,790 --> 00:04:27,410
And over here, it's telling us the meaning of Jeopardy, so Jeopardy is equal to this, the base address

58
00:04:27,410 --> 00:04:30,260
of GPA, you bought the OK.

59
00:04:33,170 --> 00:04:40,250
So once this is done, we said we're going to have full peace so I can simply copy this paste and change

60
00:04:40,250 --> 00:04:50,510
12 year to 13 page again, change 12 to 14 based again, change 12 to 15.

61
00:04:51,500 --> 00:04:51,860
Right.

62
00:04:52,610 --> 00:04:59,600
I can do this or I can combine all of this into this second argument by using the operator such that

63
00:04:59,630 --> 00:05:02,570
I can see all 13 over here.

64
00:05:05,170 --> 00:05:07,210
And then another all.

65
00:05:08,550 --> 00:05:11,460
Fourteen and then finally or.

66
00:05:13,450 --> 00:05:18,420
Fifteen over here like this, and then I can clean all of this, right?

67
00:05:18,460 --> 00:05:24,070
So with this single line we're going to write being 12, 13, 14, 15, we're going to write zero to

68
00:05:24,070 --> 00:05:24,670
these pens.

69
00:05:25,030 --> 00:05:28,060
So the entire second argument is all of this.

70
00:05:29,390 --> 00:05:32,900
You see, the comma is here and here, we don't have comma between them.

71
00:05:33,450 --> 00:05:33,950
OK.

72
00:05:35,360 --> 00:05:40,100
So once that is done, we can figure out a way to configure the pins, we need to create an instance

73
00:05:40,100 --> 00:05:42,940
of the the GPO in its structure.

74
00:05:43,640 --> 00:05:47,390
So I'll come up here and then I'll see.

75
00:05:48,730 --> 00:05:55,120
GPA, you know, school in it, typedef, and then I'm going to call this.

76
00:05:57,050 --> 00:06:06,800
GPA, you underscore, and its structure like this, and if you want to know what this is, we can double

77
00:06:06,800 --> 00:06:10,360
click this right click open declaration.

78
00:06:10,640 --> 00:06:12,220
And this is just a structure.

79
00:06:12,230 --> 00:06:18,320
This structure has various members that pin the mood pool speed alternate.

80
00:06:18,710 --> 00:06:22,040
And then what we're going to do is we've created an instance of this structure.

81
00:06:22,040 --> 00:06:25,190
So we're going to assign a value to each member of this structure.

82
00:06:25,460 --> 00:06:31,460
And this structure is taken as argument by the GPA you initialization function.

83
00:06:31,490 --> 00:06:36,740
So after we've assigned values to the structure members, we're going to pass the structure as argument

84
00:06:36,740 --> 00:06:42,130
to a function that would initialize our ports using the structure member values.

85
00:06:42,380 --> 00:06:43,590
We shall see how that goes.

86
00:06:44,780 --> 00:06:45,830
So come over here.

87
00:06:46,250 --> 00:06:48,830
We created this structure instance.

88
00:06:48,830 --> 00:06:50,440
We we're calling it in its structure.

89
00:06:50,870 --> 00:06:57,440
So we first want to access the member and we can still use our operator here to.

90
00:06:58,680 --> 00:07:05,430
Gets all of our pins and then once that is done, we going to access the mood member.

91
00:07:09,250 --> 00:07:18,180
So I said, what moved over here and the mood over here is Jhpiego mood, we said we want output.

92
00:07:18,490 --> 00:07:20,940
So we say output ppy meaning output.

93
00:07:20,950 --> 00:07:25,870
Push-Pull to see what other moods we have, we can double click on this right.

94
00:07:25,870 --> 00:07:27,340
Click open declaration.

95
00:07:27,940 --> 00:07:29,980
And you can see we have various modes here.

96
00:07:30,010 --> 00:07:31,420
There's a mode for inputs.

97
00:07:31,750 --> 00:07:34,870
There is output, Push-Pull output, open drain.

98
00:07:35,170 --> 00:07:43,840
And this is another type of output mode that we use for peripherals such as the spy pens and the U.S.

99
00:07:43,840 --> 00:07:44,290
pens.

100
00:07:44,680 --> 00:07:49,070
So the normal output is the the Push-Pull or the PPP.

101
00:07:49,420 --> 00:07:49,930
OK.

102
00:07:50,870 --> 00:07:56,150
So once that is done, we're going to set a pool of copy this.

103
00:07:59,270 --> 00:08:06,560
And then the member we want is the pool and we're going to say we don't want to pull up my caps, lock

104
00:08:06,560 --> 00:08:07,910
freezes sometimes.

105
00:08:11,870 --> 00:08:20,360
OK, so we can see you on a school, no pool, and then once they start, we can set the speed.

106
00:08:24,780 --> 00:08:27,870
So we want to access the speed member of the structure.

107
00:08:30,620 --> 00:08:36,110
So we're going to say you on a score speed, Alesco, Phreak.

108
00:08:37,910 --> 00:08:39,500
Low for low frequency.

109
00:08:40,490 --> 00:08:44,720
OK, so once that is done, we're going to call our Jhpiego in its function.

110
00:08:44,940 --> 00:08:46,210
So I'll say it over here.

111
00:08:46,250 --> 00:08:49,430
I'll underscore Jhpiego underscore.

112
00:08:51,900 --> 00:08:58,470
In it and then this takes two argument, the first argument is the port you want to initialize.

113
00:08:59,040 --> 00:09:04,010
So you quoted the second argument is the init structure.

114
00:09:04,020 --> 00:09:07,860
Remember, we've assigned these values to this structure, remember?

115
00:09:08,580 --> 00:09:14,550
OK, so we're going to parse this structure address over here, right?

116
00:09:18,490 --> 00:09:25,390
OK, so we are done, so this function makes you in it as code in our main function, so we need not

117
00:09:25,390 --> 00:09:26,130
call it again.

118
00:09:26,530 --> 00:09:27,440
So it's over here.

119
00:09:28,210 --> 00:09:33,430
OK, so what I'm going to do next is I'm going to create some macros here.

120
00:09:35,080 --> 00:09:43,000
At the top here, I'm going to define green, orange, red, blue, and this I'm going to assign the

121
00:09:43,000 --> 00:09:46,000
PIN number to these words, if you may.

122
00:09:46,270 --> 00:09:46,930
So I'll see.

123
00:09:47,860 --> 00:09:49,420
Define over here green.

124
00:09:54,280 --> 00:10:01,270
Greenest European 12 GPA, you call this GPA, you or it is called GPA, you.

125
00:10:02,930 --> 00:10:07,440
PIN 12, I should very I should be careful of my language.

126
00:10:07,700 --> 00:10:11,840
So what we are doing here is we want to call 12 green.

127
00:10:13,220 --> 00:10:14,300
That's what this means.

128
00:10:15,110 --> 00:10:20,840
This this has been defined somewhere, but we want to be able to use the word green to access whatever

129
00:10:20,840 --> 00:10:21,350
this is.

130
00:10:22,040 --> 00:10:25,090
OK, I'm going to make a copy paste this over here.

131
00:10:26,060 --> 00:10:27,470
I'll call this orange.

132
00:10:31,440 --> 00:10:39,490
Orange Espin, 13, make a copy pasted over here, I call this red.

133
00:10:40,830 --> 00:10:49,550
This has been 14 a page this over here called this blue and this been 15.

134
00:10:49,740 --> 00:10:54,030
OK, so I can just use green, orange, red, blue to access these pins.

135
00:10:54,600 --> 00:10:55,050
OK.

136
00:10:57,170 --> 00:11:04,310
So what are we going to do is we currently have three tasks I'm going to create another task known as

137
00:11:04,310 --> 00:11:07,570
the Orange Task, because we don't have orange control of the task here.

138
00:11:07,580 --> 00:11:08,800
I'll copy this page.

139
00:11:08,810 --> 00:11:11,570
This change the word green here to orange.

140
00:11:18,530 --> 00:11:19,220
Sorry about that.

141
00:11:21,250 --> 00:11:29,530
Like cops look, GIPS disappointed me orange, OK, and I'm going to create a profile of for it.

142
00:11:38,670 --> 00:11:43,980
And then over here, this is where we create our task, I'm going to make a copy of this controversy

143
00:11:43,980 --> 00:11:44,490
to copy.

144
00:11:46,450 --> 00:11:47,860
And then I call this.

145
00:11:50,660 --> 00:11:54,200
Orange, call this orange.

146
00:11:56,060 --> 00:12:03,230
And then I'll create a task function for it, I'll make a copy of this one here and then change this

147
00:12:03,230 --> 00:12:03,860
word green.

148
00:12:06,160 --> 00:12:10,600
To orange and then orange.

149
00:12:11,320 --> 00:12:15,370
OK, let's it and see what we have, I'll click over here to build.

150
00:12:18,940 --> 00:12:22,870
We have no error, no warning or download onto the board by clicking over here.

151
00:12:25,100 --> 00:12:26,030
We need this.

152
00:12:27,930 --> 00:12:28,970
I say, OK.

153
00:12:36,310 --> 00:12:36,850
Switch.

154
00:12:42,930 --> 00:12:47,040
I see, so I'm going to add our orange profiler.

155
00:12:47,960 --> 00:12:53,330
To our live expressions window double click control to copy.

156
00:12:54,460 --> 00:13:01,840
Contrary to hits, enter a click here to run, so we have all of our four tasks running at almost the

157
00:13:01,840 --> 00:13:02,440
same rate.

158
00:13:02,950 --> 00:13:05,320
OK, so we're looking good now.

159
00:13:05,320 --> 00:13:11,180
We're going to let each of them talk their respective pins, OK, to do that.

160
00:13:11,320 --> 00:13:13,960
I'm going to drop in the whole GPU.

161
00:13:14,840 --> 00:13:19,290
I'll see how Alesco GPU.

162
00:13:19,300 --> 00:13:25,690
There's a function called How You Toggle PIN and this target, the pin.

163
00:13:26,800 --> 00:13:28,540
This function takes two argument.

164
00:13:29,620 --> 00:13:32,620
It takes to the port and then the pin you want to toggle.

165
00:13:32,620 --> 00:13:37,060
Tokyo simply means if it's own, set it off if it's offset at all.

166
00:13:37,360 --> 00:13:41,050
So this is going to go on off on off because it's in an infinite loop.

167
00:13:41,560 --> 00:13:51,460
So the what we're dealing with this GPA, you'd keep D and we are in the blue task controller, so we

168
00:13:51,460 --> 00:13:54,010
want to toggle blue here, OK?

169
00:13:55,720 --> 00:13:56,170
Right.

170
00:13:56,440 --> 00:14:02,830
So I'm going to comment on this, our profiler, and then I'll copy this Tokyo line or come to read

171
00:14:03,100 --> 00:14:05,950
or comment or the profiler and then.

172
00:14:08,650 --> 00:14:10,880
You can yeah, I'm just commenting to profile.

173
00:14:10,900 --> 00:14:14,770
It's not going to affect this experiment, but yeah.

174
00:14:15,640 --> 00:14:21,760
So now I'll go to Green, I'll comment on this line.

175
00:14:28,220 --> 00:14:31,250
Green over here, then orange.

176
00:14:38,260 --> 00:14:39,310
Should be all cups.

177
00:14:40,600 --> 00:14:41,800
OK, now let's build.

178
00:14:43,850 --> 00:14:45,120
A click over here to build.

179
00:14:46,860 --> 00:14:49,770
It's built successfully click here to download onto the board.

180
00:14:53,570 --> 00:15:00,620
I'll click switch over here, and this time what I'm going to do is come over here to this top SFR as

181
00:15:01,340 --> 00:15:02,390
I click over here.

182
00:15:04,940 --> 00:15:12,460
And over here, we have our various peripherals, I'm going to scroll down to where Cupido is located,

183
00:15:13,010 --> 00:15:14,230
there is G.P.A. here.

184
00:15:14,240 --> 00:15:18,440
G.P.A. is what we are interested in, a click to dropdown.

185
00:15:18,680 --> 00:15:24,920
And what we want to see is the output data register, because when you are turning a pen on and off

186
00:15:24,920 --> 00:15:28,580
your turn its respective bits in the output data register.

187
00:15:28,790 --> 00:15:30,940
So Odera here, I'm going to expand it.

188
00:15:31,340 --> 00:15:38,390
And what we are interested in is these are 12, 13, 14, 15, OK.

189
00:15:39,470 --> 00:15:40,940
So I'm going to click to run.

190
00:15:42,850 --> 00:15:43,630
And let's see.

191
00:15:46,830 --> 00:15:47,970
Nothing has happened in.

192
00:15:52,890 --> 00:15:53,460
Lasse.

193
00:15:55,530 --> 00:15:57,150
OK, when I posted.

194
00:15:58,730 --> 00:16:06,590
We see that the AR 15 is one of the AR 14 is one Odia, 13 is zero or the AR 12 is one.

195
00:16:06,920 --> 00:16:10,570
OK, perhaps it's not fast enough to give us live updates.

196
00:16:10,820 --> 00:16:11,780
So I'm running again.

197
00:16:11,790 --> 00:16:12,710
I'm going to pause it.

198
00:16:13,990 --> 00:16:21,810
And I can see this time, Odera, 15 is one, 14 is one of the 13 is one, Audiard 12 is zero.

199
00:16:22,600 --> 00:16:23,620
And then I'll run again.

200
00:16:24,870 --> 00:16:30,780
And then opposite, I can see you are suppose, when these are the ones where other zero states, but

201
00:16:31,110 --> 00:16:38,130
to confirm or to know that our threats are toggling these pins, you would see that from 11 downwards,

202
00:16:38,130 --> 00:16:43,160
everything to zero is just our respective opinions that change that Tokyo from one to zero.

203
00:16:43,560 --> 00:16:46,320
But we cannot it doesn't appear life.

204
00:16:46,320 --> 00:16:47,730
So we have to pause.

205
00:16:48,330 --> 00:16:50,910
So I'll come here, pause again, as you can see.

206
00:16:52,230 --> 00:16:54,180
This what we have are running in.

207
00:16:55,140 --> 00:16:56,010
And then pause.

208
00:16:57,860 --> 00:16:58,430
OK.

209
00:16:59,380 --> 00:16:59,820
Right.

210
00:17:02,090 --> 00:17:06,420
And if we want to display their values in decimal notation, we can click here.

211
00:17:07,280 --> 00:17:10,930
OK, so now let's run again.

212
00:17:11,720 --> 00:17:13,060
I'm running our ports.

213
00:17:13,700 --> 00:17:14,930
You see, we've had.

214
00:17:17,120 --> 00:17:19,310
One one 00 here, let's try it again.

215
00:17:21,400 --> 00:17:22,320
Then I'll pause.

216
00:17:23,220 --> 00:17:31,100
OK, run again, in a way, you get a point, so if you have the Discovery boat, you would see Allard's

217
00:17:31,110 --> 00:17:31,750
Togo here.

218
00:17:31,860 --> 00:17:37,140
So these are the opinions we're talking 12, 13, 14, 15.

219
00:17:37,710 --> 00:17:40,260
But the threats are running too fast.

220
00:17:40,290 --> 00:17:42,210
We cannot see this go on and off.

221
00:17:42,210 --> 00:17:42,630
On and off.

222
00:17:42,630 --> 00:17:43,100
On and off.

223
00:17:43,440 --> 00:17:43,660
It's.

224
00:17:44,630 --> 00:17:45,260
OK.

225
00:17:47,070 --> 00:17:52,990
So now we going to do what we came here for.

226
00:17:53,760 --> 00:17:57,600
We said we're going to make use of the task parameters.

227
00:17:58,800 --> 00:18:05,820
So the task, the task parameters allows us to minimize the number of task functions that we require.

228
00:18:06,300 --> 00:18:12,570
As you can see, as our current our water system looks, we have four tasks.

229
00:18:13,110 --> 00:18:14,680
They all do the same thing.

230
00:18:14,730 --> 00:18:17,220
The only difference is they totally separate spin.

231
00:18:17,700 --> 00:18:22,580
But they also Gilpin's the only difference is the PIN number that they told you.

232
00:18:22,950 --> 00:18:24,090
So all of these.

233
00:18:26,000 --> 00:18:35,660
It seems redundant, so there is a way to solve this problem by passing the PIN number as argument to

234
00:18:35,660 --> 00:18:37,010
a single task function.

235
00:18:38,340 --> 00:18:45,720
And then the task will be created to just deal with a PIN number rather than we explicitly created multiple

236
00:18:45,720 --> 00:18:46,950
task functions here.

237
00:18:48,340 --> 00:18:50,590
I'll show you what I mean, so.

238
00:18:51,920 --> 00:18:58,460
Rather than have four task functions, I'm going to delete three of them.

239
00:19:01,050 --> 00:19:06,900
OK, so now we have just blew task function, blew TASC function is going to become generic.

240
00:19:06,900 --> 00:19:13,260
So I'm going to change the word blue TASC Blue, I should call it, by its proper name.

241
00:19:13,260 --> 00:19:17,370
Blue ality controller task is the blue task function.

242
00:19:17,640 --> 00:19:21,850
So I'm going to change the name to the controller task rather than blue.

243
00:19:22,230 --> 00:19:25,440
So I change over here to the controller task.

244
00:19:26,250 --> 00:19:27,720
No way to copy this.

245
00:19:28,530 --> 00:19:33,960
I'm still going to create four tasks here, but at the position of task function, they are all going

246
00:19:33,960 --> 00:19:37,950
to use the controller task as the task function.

247
00:19:39,660 --> 00:19:42,120
Like this and everything else remains the same.

248
00:19:42,900 --> 00:19:49,860
So over here, I'm going to delete these prototypes and then we have a single one lady controller task,

249
00:19:50,640 --> 00:19:51,010
right?

250
00:19:51,420 --> 00:19:59,370
So the difference here is that when I'm creating blue lady controller task, which is this first one,

251
00:19:59,610 --> 00:20:02,430
the task function is the same ALYDA controller task.

252
00:20:02,670 --> 00:20:06,530
But I'm going to pass on documents of blue here.

253
00:20:07,260 --> 00:20:10,320
Remember, in our previous lesson, we gave no argument.

254
00:20:10,360 --> 00:20:15,020
So this is now I'm going to pass a pointer to Blue here to do that.

255
00:20:15,030 --> 00:20:18,090
I'm going to come up here to define a number of pointers.

256
00:20:19,710 --> 00:20:21,120
So I'll come over here.

257
00:20:21,150 --> 00:20:22,290
I'll see constant.

258
00:20:26,590 --> 00:20:28,630
You ain't 16 and a.

259
00:20:31,000 --> 00:20:41,380
Star Blue Lady, and over here, Blue Lady, this is going to point to this.

260
00:20:42,330 --> 00:20:43,210
Sorry about that.

261
00:20:48,770 --> 00:20:54,180
Going to typecasts to you in 16, unless t point to.

262
00:20:56,180 --> 00:20:59,870
OK, then I'm going to copy this paste.

263
00:21:01,130 --> 00:21:06,890
Paced, and then this year I'm going to change it to red and then.

264
00:21:10,800 --> 00:21:12,240
I'm going to change this to red.

265
00:21:15,790 --> 00:21:16,240
Then.

266
00:21:20,670 --> 00:21:24,060
I'm going to change this to green, and this will be for green.

267
00:21:28,080 --> 00:21:30,670
Then finally, it's going to be one for orange.

268
00:21:39,120 --> 00:21:45,390
OK, so now I'm going to parse these pointers as the arguments over here.

269
00:21:46,210 --> 00:21:48,010
Right, so I'm going to copy.

270
00:21:49,380 --> 00:21:54,690
Blew the lid and then over here, I have to typecast it to avoid pointer.

271
00:21:59,310 --> 00:22:08,210
And then I'm going to copy this, and then when I come over here Green, I'm going to pass Green Lady

272
00:22:08,230 --> 00:22:08,580
here.

273
00:22:10,660 --> 00:22:14,110
And then when I come over here, orange bellied.

274
00:22:15,730 --> 00:22:20,050
Orange here seems to be missing red.

275
00:22:22,790 --> 00:22:24,470
Green, orange.

276
00:22:24,680 --> 00:22:25,490
OK, red.

277
00:22:26,120 --> 00:22:26,740
Over here.

278
00:22:31,770 --> 00:22:32,470
Read aloud.

279
00:22:32,790 --> 00:22:34,500
OK, so this what we have, right?

280
00:22:35,980 --> 00:22:37,220
Everything else is the same.

281
00:22:38,140 --> 00:22:38,650
OK?

282
00:22:39,070 --> 00:22:44,830
And these pointis have access to our green, orange, red, blue.

283
00:22:45,970 --> 00:22:52,480
So now when I come to our generic task function that we have over here, over here, I'm simply going

284
00:22:52,480 --> 00:22:56,430
to say grab parameters, parameters here.

285
00:22:57,610 --> 00:23:01,330
It's going to be here and I'm going to typecast it to you in 16.

286
00:23:04,480 --> 00:23:08,410
Like this, so I'm going to click over here to build.

287
00:23:12,230 --> 00:23:13,310
We have one warning.

288
00:23:14,410 --> 00:23:15,070
I see.

289
00:23:19,170 --> 00:23:24,660
OK, it says constant August from point to integer of different size.

290
00:23:26,580 --> 00:23:27,170
OK.

291
00:23:29,770 --> 00:23:36,940
Let's see up here, you in 16, an escort that we use you in 16.

292
00:23:38,580 --> 00:23:40,350
We used you in 16 here.

293
00:23:49,400 --> 00:23:50,800
OK, let's run and see.

294
00:23:51,580 --> 00:23:59,690
I'll leave this one and let's put a bit of delay and see if we add some delay, could we see our pins

295
00:23:59,690 --> 00:24:02,930
Tokyo so that we wouldn't need to pause to observe.

296
00:24:03,500 --> 00:24:09,500
So I'll see for our creates a pseudo delay by simply saying for I.

297
00:24:10,770 --> 00:24:22,650
Which I shall create over here and I say for I, because zero is less than, let's say sixty thousand.

298
00:24:25,150 --> 00:24:25,960
Plus, plus.

299
00:24:27,010 --> 00:24:28,150
When we open and close.

300
00:24:30,280 --> 00:24:32,470
OK, let's build a click over here.

301
00:24:35,030 --> 00:24:35,630
See?

302
00:24:40,230 --> 00:24:43,020
Then I'll click over here to download onto the board.

303
00:24:45,450 --> 00:24:46,970
OK, let's switch over here.

304
00:24:48,570 --> 00:24:50,010
And I'm going to scroll down here.

305
00:24:53,750 --> 00:24:59,570
You deliver here, are over here and click to run.

306
00:25:01,250 --> 00:25:02,150
And then pause.

307
00:25:04,070 --> 00:25:05,060
And quick to run.

308
00:25:07,300 --> 00:25:13,270
And then pause, OK, so it's not changing, so let's take a look at our warning warning that.

309
00:25:15,430 --> 00:25:16,330
We were given.

310
00:25:19,190 --> 00:25:23,910
So let's inspect our code from the top here.

311
00:25:24,740 --> 00:25:33,870
We created these pointis blue for our blue values here, red for red value, green for green over here.

312
00:25:33,920 --> 00:25:35,690
Orange has to be orange.

313
00:25:36,290 --> 00:25:38,270
OK, so that's the first anomaly.

314
00:25:39,020 --> 00:25:42,350
But we were receiving a warning down here.

315
00:25:44,240 --> 00:25:47,960
Let's check the second argument taken by this function.

316
00:25:48,860 --> 00:25:49,240
Right.

317
00:25:49,250 --> 00:25:52,120
Our double click on this function open declaration.

318
00:25:53,180 --> 00:25:56,170
The second argument is you in 16, unaskable 30.

319
00:25:56,180 --> 00:25:57,080
So that is fine.

320
00:25:57,110 --> 00:25:58,110
It shouldn't be a problem.

321
00:25:58,750 --> 00:26:02,750
OK, so I think what is happening is because we run in pause.

322
00:26:02,750 --> 00:26:08,350
Sometimes when we pause, we pause at a position where the Tokyo for all the threats are zero.

323
00:26:08,720 --> 00:26:10,550
So we would have to try a few times.

324
00:26:10,940 --> 00:26:15,230
But if you connect Leidy's to these boards, you should see the elitist Tokyo.

325
00:26:16,770 --> 00:26:18,040
Almost at the same rate.

326
00:26:18,660 --> 00:26:20,790
OK, so I click over here to build again.

327
00:26:22,970 --> 00:26:25,460
And then I'll go over here to beg for you.

328
00:26:29,080 --> 00:26:29,830
And switch.

329
00:26:34,180 --> 00:26:39,300
And then going to open a window open argued over here.

330
00:26:40,430 --> 00:26:41,750
ODI register.

331
00:26:42,740 --> 00:26:44,660
And then I'm going to click to run.

332
00:26:46,180 --> 00:26:52,690
And I'm going to pause, I'm going to click to run again and impose, I'm just hoping to get it at a

333
00:26:52,690 --> 00:26:55,060
position where we pause are the.

334
00:26:55,890 --> 00:26:59,730
At a point where some of the threads have to go to the one state.

335
00:27:01,370 --> 00:27:03,260
So pause, OK?

336
00:27:03,500 --> 00:27:09,080
We were lucky this time, so we have all the threats, that one, I hope you understand what's going

337
00:27:09,080 --> 00:27:09,220
on.

338
00:27:09,230 --> 00:27:15,920
It's toggling rapidly and when it's totally rapidly, we don't get this updated rapidly.

339
00:27:15,920 --> 00:27:19,610
So we pause to try to see what is its current status.

340
00:27:20,030 --> 00:27:22,290
And often when we pause, we find it.

341
00:27:22,290 --> 00:27:25,120
That's the state where all of them have to go to zero.

342
00:27:25,430 --> 00:27:31,520
And this time we'll be able to find them at where all of them have two to one so we can run again.

343
00:27:32,030 --> 00:27:40,390
I run again and then stop run again and then stop, run again and I stop.

344
00:27:41,000 --> 00:27:45,080
OK, so this is a if it connects is to them, you should see them together.

345
00:27:46,010 --> 00:27:49,700
And if you have the discovery, both of these are connected to these pins.

346
00:27:49,880 --> 00:27:51,170
So you should see your facilities.

347
00:27:51,170 --> 00:27:51,590
Told you.

348
00:27:51,860 --> 00:27:53,330
But that's what we Flindt.

349
00:27:53,330 --> 00:27:54,650
We have a single.

350
00:27:55,580 --> 00:27:56,780
Tosk function here.

351
00:28:00,500 --> 00:28:05,510
We have a single task function here, however, we have four tasks.

352
00:28:06,500 --> 00:28:14,610
And the way we are able to execute all of our four tasks using this single task function is by adding

353
00:28:14,660 --> 00:28:18,440
to that task parameter to the tasks when we create them.

354
00:28:19,920 --> 00:28:20,490
OK.

355
00:28:23,200 --> 00:28:25,140
So this is it, I'll see you later.
