1
00:00:06,100 --> 00:00:07,300
Now we'll clear the line.

2
00:00:07,330 --> 00:00:13,480
Turtle package in which we will be keeping all the records that are related to our robot into that package.

3
00:00:13,510 --> 00:00:13,870
Okay.

4
00:00:13,870 --> 00:00:14,770
So open the terminal.

5
00:00:14,800 --> 00:00:18,840
But this time we are not going to open the traditional terminal.

6
00:00:18,850 --> 00:00:20,700
We need to install advanced terminal.

7
00:00:20,710 --> 00:00:24,850
So for that we will go to the Ubuntu store and search here.

8
00:00:24,970 --> 00:00:25,870
Terminator.

9
00:00:26,140 --> 00:00:29,590
This is the Terminator and from here you will be able to install.

10
00:00:29,590 --> 00:00:36,400
In my case it is an already installed open the terminator and now we will have to create the package.

11
00:00:38,810 --> 00:00:41,600
And will create a package using this command.

12
00:00:44,030 --> 00:00:47,970
Back of them is New line turtle.

13
00:00:49,640 --> 00:00:53,420
Name should be new line.

14
00:00:54,300 --> 00:01:01,550
Der doe underscore intro in which we will be keeping some basic information about line turtle and hit

15
00:01:01,550 --> 00:01:02,000
enter.

16
00:01:02,000 --> 00:01:03,860
This will create a package.

17
00:01:06,270 --> 00:01:08,100
But this is the package right here.

18
00:01:08,100 --> 00:01:15,420
We will create a folder that is 32 micro process.

19
00:01:15,450 --> 00:01:18,780
This directory will keep the all micro rossport.

20
00:01:18,900 --> 00:01:20,430
Now we will build this.

21
00:01:26,930 --> 00:01:30,850
And now we'll have to write a code for micro roles.

22
00:01:31,910 --> 00:01:38,750
If we will navigate to the example of micro sport and we will open the basic subscriber.

23
00:01:44,080 --> 00:01:50,680
And in the first step, we are going to control the LEDs choosing the micro Roth.

24
00:01:51,100 --> 00:01:52,510
There are two alleles.

25
00:01:53,080 --> 00:01:56,230
So do we have to create two topics to control them?

26
00:01:56,920 --> 00:01:57,460
Well, no.

27
00:01:57,790 --> 00:02:03,460
I will create just one end subscriber that will be taking the values from the user.

28
00:02:03,460 --> 00:02:08,000
And if we give it a zero, it should turn off both alleles.

29
00:02:08,020 --> 00:02:11,380
If we give it one, it should turn on the left.

30
00:02:11,980 --> 00:02:15,370
If we give it two, it will turn on this right.

31
00:02:15,700 --> 00:02:19,900
And if we give it three, it will turn on the both ladies.

32
00:02:19,930 --> 00:02:25,240
Okay, this way we will be saving our memory and our computation power as well.

33
00:02:25,480 --> 00:02:31,600
And while we are creating the subscriber, not the publisher, because it is Micro Spark will be receiving

34
00:02:31,600 --> 00:02:36,550
the information from the user that which lady has to turn on or turn off.

35
00:02:36,550 --> 00:02:37,150
Okay.

36
00:02:38,320 --> 00:02:46,070
And this is the basic code of the subscriber and we are going to use the int edge because our number

37
00:02:46,070 --> 00:02:46,790
will be smaller.

38
00:02:46,790 --> 00:02:50,030
Martin Bigger one and the subscriber.

39
00:02:52,040 --> 00:02:58,280
S underscore underscore this shouldn't be the convention for us where to message the lady's message

40
00:02:58,400 --> 00:03:06,800
and the type and it and let this sink same subscription godlike.

41
00:03:06,800 --> 00:03:17,360
And in here we will mention it and also mention it because we are using the end at we are not going

42
00:03:17,360 --> 00:03:20,810
to use is built in and here is ignored.

43
00:03:20,810 --> 00:03:21,980
We will modify this.

44
00:03:24,190 --> 00:03:30,550
They're fine and they server named L and Flawless.

45
00:03:31,060 --> 00:03:39,250
And in here we should mention Mint eight and the subscriber should fee LEDs underscore subscriber.

46
00:03:39,970 --> 00:03:46,510
And in the executor you are seeing here run so which is representing deep sweat the number absurd.

47
00:03:46,510 --> 00:03:49,780
If we are using this one subscriber, it will be one.

48
00:03:49,930 --> 00:03:53,200
And if we are using two subscriber, they will be invalid.

49
00:03:53,200 --> 00:03:54,490
It will modify to two.

50
00:03:54,490 --> 00:04:00,100
And if there are some other threats and it will be changed according to them.

51
00:04:00,460 --> 00:04:10,210
And in here our subscriber is subscriber and method is message and subscription Callback is also adding

52
00:04:10,210 --> 00:04:11,280
a subscription call.

53
00:04:12,220 --> 00:04:15,100
Now we'll verify it if everything is right.

54
00:04:16,250 --> 00:04:22,060
Yeah, this is successfully compiled, so we have to show this topic on our terminal.

55
00:04:22,060 --> 00:04:26,030
So what we will do, we have to connect the Microsoft agent.

56
00:04:26,030 --> 00:04:29,600
So for that we will first connect the robot.

57
00:04:29,630 --> 00:04:38,420
One thing that you will keep in mind if you are connecting robot Esp32 with PC, then the ISPs getting

58
00:04:38,420 --> 00:04:39,320
power from the PC.

59
00:04:39,350 --> 00:04:44,420
Then you must keep your power switch off, otherwise you may get your burn.

60
00:04:44,420 --> 00:04:48,920
So this is the warning that you must take into consideration.

61
00:04:49,070 --> 00:04:52,820
Okay, now we have to launch the Microsoft agent.

62
00:04:54,820 --> 00:05:08,800
Well with the cereal and -1 to 3 we are using, we can see from here and tab T zero and showcase.

63
00:05:08,800 --> 00:05:09,850
This can be different.

64
00:05:10,550 --> 00:05:12,010
You should see it.

65
00:05:14,350 --> 00:05:16,830
And this is trying to connect with the Esp32.

66
00:05:16,840 --> 00:05:24,010
But if the esp32 needs a reset, just plug out your USB and plug in.

67
00:05:24,340 --> 00:05:25,480
It will be reconnected.

68
00:05:25,870 --> 00:05:30,580
I'm sorry, we will have to upload it to code first.

69
00:05:35,440 --> 00:05:38,860
Came to you my girls off and applaud the poor.

70
00:05:38,860 --> 00:05:45,580
Now, if your micro Rosenau is working, then you will not be able to upload the code.

71
00:05:47,680 --> 00:05:49,120
The code is uploaded now.

72
00:05:49,120 --> 00:05:50,590
We will run the micro off mode.

73
00:05:51,760 --> 00:05:52,840
This is connected.

74
00:05:52,870 --> 00:05:54,210
This is absolutely correct.

75
00:05:54,400 --> 00:05:58,030
Now I'm going to show the magic of the Terminator again.

76
00:05:58,030 --> 00:05:59,460
To split vertically.

77
00:05:59,470 --> 00:06:00,220
Yes.

78
00:06:00,220 --> 00:06:04,870
Pros to topic New List.

79
00:06:07,640 --> 00:06:08,740
Leads.

80
00:06:08,990 --> 00:06:12,260
This is the topic that we have just created.

81
00:06:12,620 --> 00:06:19,090
But Ros2 topic covered this topic and the messages.

82
00:06:19,160 --> 00:06:22,810
S3 and IT and the colon.

83
00:06:22,940 --> 00:06:23,440
Tata.

84
00:06:24,140 --> 00:06:24,790
Colon.

85
00:06:25,460 --> 00:06:25,870
Sure.

86
00:06:27,680 --> 00:06:27,980
Okay.

87
00:06:27,980 --> 00:06:34,550
This is publishing and if I give it like two, does it turn on any already?

88
00:06:34,580 --> 00:06:37,580
No, currently it is not turning on any.

89
00:06:37,940 --> 00:06:41,810
So we have to mention the this pin.

90
00:06:41,930 --> 00:06:43,820
So LEDs are connected.

91
00:06:43,820 --> 00:06:51,080
Direct LEDs are is connected at 17 pin and write Led is connected at 16 PIN.

92
00:06:51,740 --> 00:06:54,710
We have to modify the code again a little bit.

93
00:06:58,060 --> 00:07:04,810
But I will mention here l underscore led and 17.

94
00:07:07,090 --> 00:07:10,690
In this setup we will also mention here.

95
00:07:14,320 --> 00:07:15,940
We have declared entirety.

96
00:07:16,060 --> 00:07:22,110
These pins are set to the output When the code will be start by default, this pin will be high.

97
00:07:22,120 --> 00:07:23,590
It is by default.

98
00:07:23,590 --> 00:07:25,780
Both LEDs will be turned on.

99
00:07:27,730 --> 00:07:28,690
You see logic.

100
00:07:28,690 --> 00:07:36,580
So we have stored this data that is is that subscriber is receiving and to this value where this variable

101
00:07:36,580 --> 00:07:42,760
value and we have used this switches on this value of T, this is zero.

102
00:07:42,760 --> 00:07:45,730
It will turn both LEDs to low.

103
00:07:45,760 --> 00:07:53,350
It receives one, it will just turn on the left and if it receives two, it will turn on the right.

104
00:07:53,710 --> 00:07:58,330
And if it receives three, it will turn on both LEDs.

105
00:07:58,360 --> 00:08:01,110
Okay, so this is the first switch state, right?

106
00:08:01,150 --> 00:08:11,110
So now we can just remove this already existing Led pin from here and switch from here and from here

107
00:08:11,110 --> 00:08:11,920
as well.

108
00:08:14,970 --> 00:08:18,270
If we will seem to score, the corn must be saved.

109
00:08:22,810 --> 00:08:24,100
In this folder.

110
00:08:24,370 --> 00:08:30,100
Esp32 Makarov and this should be in line.

111
00:08:31,600 --> 00:08:32,890
Turtle.

112
00:08:35,350 --> 00:08:47,380
Esp32 Micro Roff okay, this is the name of this will close the micro agent and upload this code.

113
00:08:49,220 --> 00:08:49,820
All right.

114
00:08:49,820 --> 00:08:53,390
So by default, both LEDs are turned on.

115
00:08:53,570 --> 00:08:56,390
Now we will connect to Microsoft agent.

116
00:08:56,420 --> 00:08:57,590
It is connected.

117
00:08:58,760 --> 00:09:00,470
And we have published two.

118
00:09:00,500 --> 00:09:02,300
It has turned on three.

119
00:09:02,690 --> 00:09:03,080
Two.

120
00:09:03,080 --> 00:09:03,530
Right.

121
00:09:03,560 --> 00:09:03,980
Led.

122
00:09:05,210 --> 00:09:05,630
Right.

123
00:09:05,750 --> 00:09:06,160
Led.

124
00:09:06,260 --> 00:09:11,630
If we want to turn off what I will give it zero.

125
00:09:12,500 --> 00:09:15,860
Both at must be turned off as you can see.

126
00:09:15,860 --> 00:09:19,010
So the port alleys are turned off.

127
00:09:19,880 --> 00:09:25,880
And if by keyword value one can left must be on.

128
00:09:26,240 --> 00:09:29,750
Yes, the left is on if carried to.

129
00:09:32,480 --> 00:09:33,640
What must be done.

130
00:09:33,760 --> 00:09:42,000
Yes, you can also add an outgoing minus one, but this will publish it just once.

131
00:09:43,040 --> 00:09:44,430
Thus three.

132
00:09:45,730 --> 00:09:46,920
Both is on.

133
00:09:46,930 --> 00:09:52,090
So our LEDs are working on micro frost.

134
00:09:52,240 --> 00:09:53,800
Congratulations, buddy.
