1
00:00:00,590 --> 00:00:01,720
Hello, welcome back.

2
00:00:01,970 --> 00:00:08,300
And this lesson we go into see another project with regards to cues, we're going to see how to synchronize

3
00:00:08,300 --> 00:00:08,870
the cues.

4
00:00:09,180 --> 00:00:12,380
I'm going to make a copy of the last project, number 14 over here.

5
00:00:12,390 --> 00:00:17,900
I'm going to make a copy by copy and paste over here like this.

6
00:00:19,030 --> 00:00:19,600
Call this.

7
00:00:21,250 --> 00:00:24,460
Fifteen, and then I call it sinking cuz.

8
00:00:32,650 --> 00:00:33,280
Like this.

9
00:00:34,150 --> 00:00:34,680
OK.

10
00:00:38,880 --> 00:00:45,630
So let's open it up, come down here, expand, call source, and then this will mean that Sifa.

11
00:00:48,710 --> 00:00:51,650
So this to me to see as it's currently ups.

12
00:00:52,570 --> 00:00:55,030
We have a Sinda task and a receiver task.

13
00:00:59,740 --> 00:01:02,980
Let's analyze the current kaleidoscopes.

14
00:01:04,110 --> 00:01:11,400
I'm trying to close this a bit and then expand this, so let's come down, we have two tasks.

15
00:01:11,790 --> 00:01:16,730
We have a receiver with a higher priority and a center task with a lower priority.

16
00:01:17,190 --> 00:01:23,880
What are we going to do is we going to create to send the tasks of the same priority and a receiver

17
00:01:23,880 --> 00:01:25,620
task of a lower priority.

18
00:01:26,190 --> 00:01:28,700
So over here, what do we need to add?

19
00:01:28,740 --> 00:01:32,370
This is our task function prototype for our center task.

20
00:01:32,560 --> 00:01:38,550
I'm going to call this center task one, then I'm going to make a copy of this and call this send a

21
00:01:38,550 --> 00:01:39,210
task to.

22
00:01:40,800 --> 00:01:43,770
And then I'm going to come down here and this bit here.

23
00:01:43,800 --> 00:01:45,230
I'm going to make a copy of it.

24
00:01:45,360 --> 00:01:51,390
Copy, then I'll paste this over here and then I'll call this center task one.

25
00:01:51,930 --> 00:01:57,540
And then in its name, I call it Task Center, Task one as well over here, then a task, too.

26
00:01:57,540 --> 00:01:59,370
And this one center task, too.

27
00:01:59,910 --> 00:02:04,510
And what I'm going to do is I'm going to give the receiver task a higher priority.

28
00:02:05,070 --> 00:02:10,380
Currently, the receiver, OK, has a priority of two and Ascender tasks.

29
00:02:11,540 --> 00:02:13,550
Priority one, priority one.

30
00:02:13,610 --> 00:02:18,200
OK, I'm going to put a comment here for you so that when I upload and you review in this.

31
00:02:22,500 --> 00:02:30,300
Create a receiver task of a higher priority.

32
00:02:32,630 --> 00:02:34,940
And then over here, what we are doing is.

33
00:02:40,270 --> 00:02:42,130
Great to send that asks.

34
00:02:45,320 --> 00:02:46,730
Of the same priority.

35
00:02:54,930 --> 00:02:57,480
Lower than the receiver task priority.

36
00:03:01,340 --> 00:03:01,940
Like this.

37
00:03:04,220 --> 00:03:05,480
OK, so we.

38
00:03:06,470 --> 00:03:14,750
Need to update the task function for the senators, I'm going to come down here, we have this task

39
00:03:14,750 --> 00:03:15,740
here, send a task.

40
00:03:15,770 --> 00:03:16,990
Now, it doesn't exist.

41
00:03:17,000 --> 00:03:18,590
It is called Send a task one.

42
00:03:19,180 --> 00:03:24,260
Then I'm going to make a copy of this and then I'll put it down here.

43
00:03:24,800 --> 00:03:27,830
I'll call this send that task to like this.

44
00:03:29,800 --> 00:03:31,000
So send a task.

45
00:03:31,040 --> 00:03:39,340
Want to send in 20, 50 or send a task to is going to send lessie 50 50 something of this nature.

46
00:03:40,390 --> 00:03:43,180
OK, so we have two tasks.

47
00:03:44,660 --> 00:03:45,500
Of sending.

48
00:03:46,640 --> 00:03:51,650
They have the same priority and one receive a task with a higher priority.

49
00:03:52,250 --> 00:03:53,670
Let's see how this turns out.

50
00:03:53,690 --> 00:03:57,650
Let's try to to load this and print it out and see what we get.

51
00:03:59,790 --> 00:04:00,870
So I'm going to build this.

52
00:04:02,430 --> 00:04:06,030
All right, click this and then come to build.

53
00:04:07,780 --> 00:04:09,100
The old project over here.

54
00:04:12,660 --> 00:04:13,470
It's in.

55
00:04:18,830 --> 00:04:25,580
OK, it's done building, so to run this rather than click this and then run in one of our old projects

56
00:04:25,580 --> 00:04:30,450
by mistake, I'm going to right click this and then click runners.

57
00:04:30,470 --> 00:04:32,170
I don't even have to go debuggers.

58
00:04:32,190 --> 00:04:34,760
I can do runners and then select SDM 30 to.

59
00:04:36,760 --> 00:04:39,280
And then I'll select number 15 over here.

60
00:04:44,210 --> 00:04:45,260
It's open in.

61
00:04:47,160 --> 00:04:49,370
OK, I'll see, OK, over here.

62
00:04:51,600 --> 00:04:53,340
No stealing connected.

63
00:04:53,560 --> 00:04:56,190
OK, microcontrollers not connected, it says.

64
00:04:58,560 --> 00:05:05,520
I have connected my microcontrollers, so let's try it again, right, click runners estimated you select

65
00:05:05,530 --> 00:05:11,130
to number 15 over here, no stealing connected, restart your debug session.

66
00:05:11,590 --> 00:05:15,420
Okay, how about I click this new city link?

67
00:05:15,840 --> 00:05:17,480
Let me post a video and find this out.

68
00:05:18,420 --> 00:05:25,680
OK, so I have to I had to restart my computer to get rid of the no StreetLink error.

69
00:05:25,740 --> 00:05:28,740
So if you have a face that you can try, restart on your computer.

70
00:05:29,250 --> 00:05:30,000
So here we are.

71
00:05:30,000 --> 00:05:31,570
We are to project 15.

72
00:05:31,590 --> 00:05:35,800
We try to flash onto our board and we received that error.

73
00:05:36,540 --> 00:05:39,900
Actually, I'm going to rename the name of the project also.

74
00:05:41,690 --> 00:05:48,790
It's about sinkin tasks using cues, not necessarily sinkin cues, because we have a single clue here.

75
00:05:49,370 --> 00:05:50,240
So I'm going to right.

76
00:05:50,240 --> 00:05:52,010
Click and rename here.

77
00:05:56,870 --> 00:05:57,620
I call this.

78
00:06:07,110 --> 00:06:07,830
Cinching.

79
00:06:09,230 --> 00:06:11,450
Talks with Kyuss.

80
00:06:16,650 --> 00:06:17,160
OK.

81
00:06:19,290 --> 00:06:19,830
It's.

82
00:06:21,230 --> 00:06:22,130
It's renaming.

83
00:06:25,910 --> 00:06:32,870
OK, it's renamed, so I'm going to build this right, click our number 15 again, right, click at.

84
00:06:37,610 --> 00:06:39,470
And then I'll deal with project.

85
00:06:45,780 --> 00:06:46,560
It's Putin.

86
00:06:58,450 --> 00:07:06,010
So once that is done, I'm going to right click and then click, run us ASTM 32, Coatex and.

87
00:07:10,020 --> 00:07:11,880
And it's going to flush it onto the board.

88
00:07:16,630 --> 00:07:18,520
Going to see OK over here.

89
00:07:25,400 --> 00:07:28,910
And it's downloaded onto the boat when we run.

90
00:07:28,940 --> 00:07:33,530
It doesn't take us to Dybbuk View, it simply downloads onto our microcontroller.

91
00:07:34,010 --> 00:07:36,140
OK, so I'm going to open real here.

92
00:07:40,620 --> 00:07:41,640
This is real, Tim.

93
00:07:45,830 --> 00:07:52,130
I'm going to come over here, select new line mode and then Partovi over here, oscillator or port?

94
00:07:53,210 --> 00:07:59,180
And then I'll select your portraits first and then I'll Portis over here and then I'll click to Open.

95
00:08:01,760 --> 00:08:03,770
As you can see, we're receiving the data.

96
00:08:04,190 --> 00:08:04,660
OK?

97
00:08:06,190 --> 00:08:06,640
So.

98
00:08:07,620 --> 00:08:15,620
Receiving the data here, the value received ID is 20, 50, the value received ID is 50 50.

99
00:08:15,840 --> 00:08:21,480
And we said over here, the reason we find the error is because we said whenever the time out occurs,

100
00:08:21,480 --> 00:08:22,610
we can print the error.

101
00:08:22,980 --> 00:08:24,680
But this is not necessarily error.

102
00:08:24,700 --> 00:08:25,230
We just.

103
00:08:26,490 --> 00:08:28,050
It's just the data did not.

104
00:08:32,560 --> 00:08:37,120
It did not get sent in the in the time that we wanted it to.

105
00:08:37,510 --> 00:08:40,750
OK, so we print in this area here to simplify it.

106
00:08:40,780 --> 00:08:44,880
I'm going to I think the error was printed from the receive side of things.

107
00:08:44,890 --> 00:08:45,370
Let's see.

108
00:08:46,640 --> 00:08:48,440
Could not receive, so he's from here.

109
00:08:49,470 --> 00:08:49,880
Right.

110
00:08:49,920 --> 00:08:54,450
So to receive this where we have the time out of two hundred or so.

111
00:08:55,840 --> 00:08:57,490
Over here, we have weeks time.

112
00:08:57,610 --> 00:09:02,260
OK, so if we are not able to receive within this week time and then we printed this, I'm going to

113
00:09:02,260 --> 00:09:08,170
simplify it by commenting this out and then we're going to do it again to analyze the results we get.

114
00:09:09,320 --> 00:09:15,140
OK, so we're not printing this if we don't receive within hundred, Ms.

115
00:09:16,470 --> 00:09:17,640
Nothing will be printed.

116
00:09:18,480 --> 00:09:18,960
OK?

117
00:09:20,220 --> 00:09:22,630
So I'll come over here to build our project again.

118
00:09:22,660 --> 00:09:24,030
I can just click here to build.

119
00:09:28,830 --> 00:09:30,220
OK, it's done building.

120
00:09:30,400 --> 00:09:37,490
Oh, get onto the boat before that, I'm going to clear real time here by clicking clear, OK.

121
00:09:37,770 --> 00:09:43,890
And all right, click on the project and then I'll go to Runner's ASTM 30 to.

122
00:09:46,900 --> 00:09:48,880
And it's flashing onto the board.

123
00:09:52,210 --> 00:09:55,510
It's seventy nine percent, ninety seven.

124
00:09:56,990 --> 00:09:57,740
It's almost done.

125
00:10:01,640 --> 00:10:03,200
OK, one hundred percent.

126
00:10:05,750 --> 00:10:11,080
OK, now, because I stopped real time by closing the ports, I'm going to click OK over here.

127
00:10:11,660 --> 00:10:17,870
And as you can see, we have the value received ID 50 50 and then two fifty.

128
00:10:18,110 --> 00:10:20,540
I'll close the port by clicking this.

129
00:10:20,840 --> 00:10:26,450
And the important thing here, the reason I did this experiment is to show that when we created our

130
00:10:26,450 --> 00:10:32,050
send in tasks and assign them equal priority are sending one after the other.

131
00:10:32,060 --> 00:10:33,860
No one is sending more than the other.

132
00:10:34,070 --> 00:10:37,460
You would see the task task one since it's.

133
00:10:38,990 --> 00:10:47,480
20, 50, and then task to since the 50 50 U.S. task, one is since task to as we see 50 fifty to fifty

134
00:10:47,480 --> 00:10:50,640
fifty, fifty to fifty, fifty, fifty, fifty to fifty.

135
00:10:50,780 --> 00:10:54,500
We never see twenty, fifty to fifty and then fifty fifty.

136
00:10:54,830 --> 00:10:58,580
This is because they send in tasks have the same priority.

137
00:10:59,180 --> 00:10:59,540
Right.

138
00:10:59,540 --> 00:11:02,450
So they send one after the other.

139
00:11:02,450 --> 00:11:02,910
Exactly.

140
00:11:02,930 --> 00:11:03,770
One after the other.

141
00:11:03,800 --> 00:11:06,290
In a way the ascendant is synchronized.

142
00:11:06,590 --> 00:11:11,500
One sense the other one says one does in W.S. and then the other one sends ones.

143
00:11:11,870 --> 00:11:16,550
So this is what we meant by synchronizing tasks, using cues.

144
00:11:16,550 --> 00:11:21,440
We've synchronize the descending from the two tasks into the same cue.

145
00:11:21,740 --> 00:11:27,110
And we did this by, you know, assigning the priorities, by giving them the same priority.

146
00:11:27,380 --> 00:11:29,000
So this order is for this lesson.

147
00:11:29,000 --> 00:11:33,010
If you have any questions, leave them in the questions in this area and I'll see you later.

148
00:11:33,020 --> 00:11:33,800
Have a nice day.
