WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.800 --> 00:00:10.600
Welcome back guys to video number 3.4 and

1
00:00:10.600 --> 00:00:13.300
 this we are going to set up MIT app

2
00:00:13.300 --> 00:00:16.100
 and whatever mobile app or esp32 Smart

3
00:00:16.100 --> 00:00:16.600
 Lock, okay.

4
00:00:17.200 --> 00:00:22.400
So here is the website just type app and enter.it.edu and

5
00:00:22.400 --> 00:00:25.800
 you will see that page then click on the create apps

6
00:00:25.800 --> 00:00:27.900
 and it will login you.

7
00:00:28.700 --> 00:00:31.600
By the Google email addresses so for that you

8
00:00:31.600 --> 00:00:33.100
 have a Google it.

9
00:00:33.900 --> 00:00:36.400
So here is the interface after

10
00:00:36.400 --> 00:00:39.100
 the login just click on the start new project.

11
00:00:41.300 --> 00:00:44.400
And type the name and here I'm going to type the

12
00:00:44.400 --> 00:00:45.000
 ESP.

13
00:00:46.500 --> 00:00:48.000
32

14
00:00:49.900 --> 00:00:50.200
smart

15
00:00:52.400 --> 00:00:53.300
Lock, okay.

16
00:00:55.700 --> 00:00:56.800
And click on that.

17
00:00:58.100 --> 00:01:02.200
And here we have a screen so firstly we need to put

18
00:01:01.200 --> 00:01:05.200
 the horizontal Arrangement one.

19
00:01:06.400 --> 00:01:10.400
To and the three actually one

20
00:01:09.400 --> 00:01:12.300
 for the message that devices are

21
00:01:12.300 --> 00:01:15.400
 the connected are the not connected. The next is a

22
00:01:15.400 --> 00:01:18.500
 list view where we will select the

23
00:01:18.500 --> 00:01:22.300
 device from the list and the third one is a button

24
00:01:22.300 --> 00:01:25.500
 to on and off. Okay, so firstly we

25
00:01:25.500 --> 00:01:29.000
 need to make the height 60 pixel.

26
00:01:29.800 --> 00:01:33.200
And the width you can say that well

27
00:01:32.200 --> 00:01:36.100
 the parent and by the way, if I

28
00:01:35.100 --> 00:01:38.300
 will make it duplicate, okay, it's not

29
00:01:38.300 --> 00:01:39.100
 making no worries.

30
00:01:40.300 --> 00:01:43.000
So again put the 60 pixels here.

31
00:01:44.400 --> 00:01:46.700
And the width of field parent, okay.

32
00:01:49.500 --> 00:01:52.200
Don't worry about that distance. It will be not shown in the app.

33
00:01:55.900 --> 00:01:56.600
60

34
00:01:58.700 --> 00:02:01.300
Sorry and feel parent,

35
00:02:01.300 --> 00:02:02.000
 okay?

36
00:02:03.300 --> 00:02:05.400
So where is the label?

37
00:02:06.600 --> 00:02:06.700
I need to

38
00:02:08.200 --> 00:02:12.200
put here the text connected. Okay not.

39
00:02:13.300 --> 00:02:16.300
Connected by default text and you can change

40
00:02:16.300 --> 00:02:17.700
 the phone to the 20.

41
00:02:18.600 --> 00:02:21.500
And click on that and make the alignment

42
00:02:21.500 --> 00:02:24.200
 center and the center by the

43
00:02:24.200 --> 00:02:27.600
 way. It's a horizontal Arrangement alignment. Okay, and here's

44
00:02:27.600 --> 00:02:29.100
 the list picker, okay.

45
00:02:30.700 --> 00:02:33.600
Make it fill the

46
00:02:33.600 --> 00:02:36.600
 parent and with fill the parent. Okay, and

47
00:02:36.600 --> 00:02:37.800
 we are good to go with that.

48
00:02:38.800 --> 00:02:39.100
and

49
00:02:40.900 --> 00:02:42.200
you can change the

50
00:02:43.700 --> 00:02:46.000
select device

51
00:02:47.200 --> 00:02:47.800
alright guys

52
00:02:49.100 --> 00:02:53.000
And the next we need to put the button here. Okay,

53
00:02:52.000 --> 00:02:53.500
 and

54
00:02:54.900 --> 00:02:57.200
Make the width and height fill the

55
00:02:57.200 --> 00:02:57.500
 parent.

56
00:02:59.400 --> 00:03:00.800
Okay, we are good to go with that.

57
00:03:01.900 --> 00:03:02.200
and

58
00:03:04.300 --> 00:03:07.000
on the lock you can say

59
00:03:07.300 --> 00:03:07.900
 that open lock.

60
00:03:08.900 --> 00:03:12.200
Yes, it's more appropriate word overlock. And

61
00:03:11.200 --> 00:03:14.500
 we're good to go with that. Now. We

62
00:03:14.500 --> 00:03:17.500
 need to click on the blocks to adjust the block.

63
00:03:17.500 --> 00:03:20.600
 So firstly we need to work

64
00:03:20.600 --> 00:03:25.000
 on the select device area Okay, so click

65
00:03:23.300 --> 00:03:27.100
 on the list picker and

66
00:03:28.300 --> 00:03:31.600
Here we need to select before picking.

67
00:03:31.600 --> 00:03:34.200
 Yes before picking when we

68
00:03:34.200 --> 00:03:38.000
 click on. We need to provide the list of the stuff.

69
00:03:37.300 --> 00:03:40.500
 Okay for the list picker. We

70
00:03:40.500 --> 00:03:43.800
 need to set the list items. Okay

71
00:03:43.800 --> 00:03:47.300
 set the list items.

72
00:03:49.200 --> 00:03:50.500
Here we need to select.

73
00:03:57.800 --> 00:04:01.400
List text not elements. We

74
00:04:00.400 --> 00:04:03.000
 need to focus on the elements.

75
00:04:04.400 --> 00:04:06.200
sorry, I am little bit new to the

76
00:04:07.100 --> 00:04:09.700
MIT App Inventor after a long time. I am using that.

77
00:04:12.100 --> 00:04:15.600
So where are the elements? We need to find out the elements?

78
00:04:15.600 --> 00:04:18.600
 Yes here for the elements and

79
00:04:18.600 --> 00:04:21.600
 from where we need to get the elements. Yes. We

80
00:04:21.600 --> 00:04:25.000
 need to get the elements from the Bluetooth, but still

81
00:04:24.100 --> 00:04:26.200
 we didn't put any

82
00:04:28.200 --> 00:04:28.900
of there.

83
00:04:29.500 --> 00:04:32.400
To connectivity. We need to click on the Bluetooth

84
00:04:32.400 --> 00:04:33.900
 client and drag that.

85
00:04:35.800 --> 00:04:38.600
And we're good to go with that. This is invisible element.

86
00:04:38.600 --> 00:04:41.600
 Okay, and now we come to the blocks here. We

87
00:04:41.600 --> 00:04:43.500
 will get the Bluetooth client. Okay.

88
00:04:45.200 --> 00:04:49.200
Click on the Bluetooth and here we need to get the address

89
00:04:48.200 --> 00:04:51.200
 and the names. Okay guys

90
00:04:51.200 --> 00:04:55.000
 and by this way, when we click on the list

91
00:04:54.600 --> 00:04:57.200
 picker, it will give us a names.

92
00:04:58.400 --> 00:05:01.900
Here after clicking that so what happened

93
00:05:01.900 --> 00:05:04.700
 when we select the device so here

94
00:05:04.700 --> 00:05:06.500
 again, we need to click on that.

95
00:05:07.500 --> 00:05:08.900
on the list picker

96
00:05:09.400 --> 00:05:12.800
and here is an event what after the picking so

97
00:05:12.800 --> 00:05:15.600
 we need to connect with

98
00:05:15.600 --> 00:05:19.100
 that. Okay. So click on the Bluetooth and

99
00:05:21.400 --> 00:05:23.000
here is the connect.

100
00:05:24.400 --> 00:05:26.300
Bluetooth Dot

101
00:05:29.200 --> 00:05:32.500
connect address that block we need to put here.

102
00:05:32.500 --> 00:05:35.700
 Okay. It's not coming here. No worries.

103
00:05:37.100 --> 00:05:40.900
No worries. Yes, firstly we need to put the

104
00:05:40.900 --> 00:05:41.500
 logic here.

105
00:05:43.500 --> 00:05:46.400
Yes, if then else, okay.

106
00:05:47.500 --> 00:05:47.800
and

107
00:05:51.200 --> 00:05:54.100
it all that and what thing we need

108
00:05:54.100 --> 00:05:56.200
 to put here is the list picker.

109
00:05:57.600 --> 00:05:57.900
and

110
00:06:01.300 --> 00:06:02.400
from there we need to.

111
00:06:07.400 --> 00:06:08.900
list picker Dot

112
00:06:09.600 --> 00:06:10.200
selection

113
00:06:12.200 --> 00:06:13.500
the what item has been

114
00:06:16.500 --> 00:06:19.200
selected by the user will connect to that

115
00:06:19.200 --> 00:06:22.300
 address. Okay after connecting when we click

116
00:06:22.300 --> 00:06:25.500
 on the connect button, we have only two options

117
00:06:25.500 --> 00:06:28.400
 other device will be connected with that app or not.

118
00:06:29.400 --> 00:06:32.100
after the connection what we need to do firstly we need

119
00:06:32.100 --> 00:06:35.100
 to change the text of the label so

120
00:06:36.800 --> 00:06:38.100
set label.

121
00:06:41.900 --> 00:06:44.100
Content where is the set level text? Okay.

122
00:06:44.800 --> 00:06:45.600
Here, okay.

123
00:06:46.500 --> 00:06:47.400
We need to put it here.

124
00:06:48.700 --> 00:06:51.300
And what we need to change is at text, okay?

125
00:06:55.200 --> 00:06:56.400
And here we need to type.

126
00:06:57.900 --> 00:07:00.600
Connect it and make it

127
00:07:00.600 --> 00:07:01.800
 that duplicate.

128
00:07:03.700 --> 00:07:05.600
And here we need to drive.

129
00:07:06.200 --> 00:07:08.500
Not connected, okay.

130
00:07:09.900 --> 00:07:12.600
So after the selection of device, the status

131
00:07:12.600 --> 00:07:15.300
 will be changed either. It will be connected or the not connected.

132
00:07:15.300 --> 00:07:18.800
 Now. The next thing is open and the close log

133
00:07:18.800 --> 00:07:19.500
 status, okay.

134
00:07:20.200 --> 00:07:20.300
so

135
00:07:22.100 --> 00:07:25.900
where we need to click on the button when button clicks what

136
00:07:25.900 --> 00:07:28.300
 we need to do here. Okay. So this

137
00:07:28.300 --> 00:07:31.600
 is the main stuff click on that and

138
00:07:31.600 --> 00:07:34.400
 drag that element here a block.

139
00:07:34.400 --> 00:07:37.300
 Sorry not element. Okay, and here we need to put the

140
00:07:37.300 --> 00:07:38.900
 control statement.

141
00:07:40.200 --> 00:07:43.400
Sorry, my drag and drop is just making

142
00:07:43.400 --> 00:07:44.000
 an issue.

143
00:07:45.400 --> 00:07:48.700
When button dot click okay, so firstly

144
00:07:48.700 --> 00:07:52.000
 we need to verify that if the value is open

145
00:07:51.400 --> 00:07:54.800
 lock or closed lock because I'm not going to use two

146
00:07:54.800 --> 00:07:56.800
 bottles. I'm just going to use the one button, okay.

147
00:07:57.700 --> 00:08:00.000
so here we need to verify the

148
00:08:01.300 --> 00:08:02.700
button value Okay, so

149
00:08:05.300 --> 00:08:07.300
Here we need to verify the stuff.

150
00:08:09.100 --> 00:08:11.600
with the button text if button text

151
00:08:12.700 --> 00:08:13.500
logic

152
00:08:14.800 --> 00:08:16.700
And we need to put here.

153
00:08:17.800 --> 00:08:19.200
if button text

154
00:08:20.200 --> 00:08:21.900
is equal equal to what?

155
00:08:23.800 --> 00:08:24.700
the text

156
00:08:25.200 --> 00:08:27.700
open log. What is that open log? Yes.

157
00:08:31.100 --> 00:08:32.300
Open lock.

158
00:08:33.700 --> 00:08:36.100
So what do we need to do is we need

159
00:08:36.100 --> 00:08:38.400
 to send the command to the Bluetooth.

160
00:08:40.300 --> 00:08:44.300
Where is the Bluetooth sand and

161
00:08:43.300 --> 00:08:46.500
 sand that

162
00:08:46.500 --> 00:08:49.500
 text call the Bluetooth and text and

163
00:08:49.500 --> 00:08:50.800
 where is the text?

164
00:08:51.700 --> 00:08:54.900
Here we need to send that and

165
00:08:54.900 --> 00:08:57.400
 the value will be the one. Okay,

166
00:08:57.400 --> 00:09:00.000
 make it the duplicate and

167
00:09:01.200 --> 00:09:05.100
We are good to go with that and we need

168
00:09:05.100 --> 00:09:08.100
 to change it to the zero. Okay, and we'll need

169
00:09:08.100 --> 00:09:09.600
 to change the button.

170
00:09:11.900 --> 00:09:12.300
text

171
00:09:14.500 --> 00:09:17.600
is the button text and it comes

172
00:09:17.600 --> 00:09:18.000
 here.

173
00:09:19.600 --> 00:09:19.800
Okay.

174
00:09:22.800 --> 00:09:23.800
Sorry with.

175
00:09:24.600 --> 00:09:25.900
Yes, here is this.

176
00:09:26.900 --> 00:09:28.800
And we need put here.

177
00:09:30.600 --> 00:09:32.000
duplicate and

178
00:09:34.700 --> 00:09:35.500
close lock

179
00:09:39.100 --> 00:09:40.500
make the duplicate.

180
00:09:48.600 --> 00:09:49.500
Open lock.

181
00:09:50.500 --> 00:09:51.700
Okay now.

182
00:09:52.700 --> 00:09:55.500
We are ready to work with that app.

183
00:09:55.500 --> 00:09:57.100
 So what we have options.

184
00:09:58.300 --> 00:10:01.400
You can use the AI companion for that. We need

185
00:10:01.400 --> 00:10:04.500
 to install mitf and water in our device and

186
00:10:04.500 --> 00:10:07.000
 it will show us a QR code and we

187
00:10:07.100 --> 00:10:10.400
 can access that app by putting that code or scanning that QR code.

188
00:10:10.400 --> 00:10:13.100
 Okay, this is the first option. The second is the

189
00:10:13.100 --> 00:10:16.400
 emulator and the third option is a USB. So I'm

190
00:10:16.400 --> 00:10:19.600
 going to use that but you have option to

191
00:10:19.600 --> 00:10:22.200
 build Android app APK and you

192
00:10:22.200 --> 00:10:25.600
 can download it and install it. Okay, and you can also build

193
00:10:25.600 --> 00:10:28.600
 the Android app until actually I

194
00:10:28.600 --> 00:10:31.600
 use that one. So I'm going to use that one. Okay.

195
00:10:37.200 --> 00:10:39.900
Welcome back guys. I actually there is a issue and

196
00:10:41.500 --> 00:10:43.600
Android 12 or later

197
00:10:44.500 --> 00:10:47.500
latest versions that the app should

198
00:10:47.500 --> 00:10:51.700
 take the permission to access the Bluetooth. So in

199
00:10:50.700 --> 00:10:53.500
 my xiaomi mobile device, actually I

200
00:10:53.500 --> 00:10:56.400
 didn't have any issue but in my Samsung mobile device,

201
00:10:56.400 --> 00:10:59.200
 it's giving the error regarding

202
00:10:59.200 --> 00:11:01.900
 the Bluetooth permission. So firstly we need to

203
00:11:02.800 --> 00:11:05.700
Add the permission system. So when the app

204
00:11:05.700 --> 00:11:08.100
 will be turned on on device, it will

205
00:11:08.100 --> 00:11:11.600
 ask for the Bluetooth and it will make our operation smooth.

206
00:11:11.600 --> 00:11:14.300
 So for that we need to add the

207
00:11:14.300 --> 00:11:15.400
 permission. So click on.

208
00:11:17.800 --> 00:11:20.900
The wind screen and

209
00:11:20.900 --> 00:11:21.800
 here we need to.

210
00:11:23.400 --> 00:11:27.100
Take the permission when screen initialize, okay and

211
00:11:26.100 --> 00:11:28.000
 click on.

212
00:11:29.200 --> 00:11:30.600
and permissions

213
00:11:33.600 --> 00:11:34.700
Where is the section?

214
00:11:37.400 --> 00:11:39.500
Ask for the permission, okay.

215
00:11:40.400 --> 00:11:43.300
And here we have the section the permission.

216
00:11:44.700 --> 00:11:47.100
Parts location. I'm going to delete that.

217
00:11:48.200 --> 00:11:51.600
And going to put a new text here.

218
00:11:53.400 --> 00:11:56.400
And the permission name is Bluetooth underscore.

219
00:11:57.500 --> 00:12:00.500
Connect. Okay, so it will take the permission

220
00:12:00.500 --> 00:12:01.800
 when the app.

221
00:12:02.600 --> 00:12:05.300
Will be initialized on the device. So I'm going

222
00:12:05.300 --> 00:12:07.900
 to use the AI companion.

223
00:12:08.600 --> 00:12:09.900
to connect with the

224
00:12:11.800 --> 00:12:14.700
MIT app and winter before moving that you

225
00:12:14.700 --> 00:12:17.600
 need to install the MIT app

226
00:12:17.600 --> 00:12:20.400
 and went to on your mobile devices and then

227
00:12:20.400 --> 00:12:23.200
 you have a two option either. You can load your app

228
00:12:23.200 --> 00:12:26.300
 by this code or by scanning the QR code. I'm going to use the

229
00:12:26.300 --> 00:12:29.200
 QR code to load the app. So just

230
00:12:29.200 --> 00:12:32.400
 give me some seconds and then I will be back with the

231
00:12:32.400 --> 00:12:32.800
 app.

232
00:12:34.500 --> 00:12:37.700
Welcome back guys. I have opened MIT app

233
00:12:37.700 --> 00:12:40.200
 and winter and here we have a two option connect with

234
00:12:40.200 --> 00:12:43.300
 the code or scan with the QR code and I'm going

235
00:12:43.300 --> 00:12:47.100
 to scan the QR code to work

236
00:12:46.100 --> 00:12:47.900
 instantly.

237
00:12:49.400 --> 00:12:51.800
And I have scanned the code.

238
00:12:53.800 --> 00:12:56.500
And within a couple of seconds the app.

239
00:12:57.300 --> 00:12:59.100
Will be loaded to my mobile device.

240
00:13:01.300 --> 00:13:04.800
Yes, and if you see here the Wild app has been

241
00:13:04.800 --> 00:13:05.400
 loaded, okay?

242
00:13:06.500 --> 00:13:09.800
The mobile app didn't ask for permission

243
00:13:09.800 --> 00:13:12.200
 because I already allotted the Bluetooth

244
00:13:12.200 --> 00:13:15.600
 permission. So just click on the select device. And here

245
00:13:15.600 --> 00:13:16.000
 we have

246
00:13:17.200 --> 00:13:17.900
a lot of

247
00:13:18.600 --> 00:13:22.100
Devices, okay, and just

248
00:13:21.100 --> 00:13:24.100
 click on the Smart Lock.

249
00:13:33.800 --> 00:13:36.400
Yes, the device is off. So I

250
00:13:36.400 --> 00:13:39.700
 need to turn on the device because it's

251
00:13:39.700 --> 00:13:42.100
 my mistake because I am using

252
00:13:42.100 --> 00:13:45.300
 that cable to charge my light device.

253
00:13:46.300 --> 00:13:49.200
So that's why it's giving the error.

254
00:13:51.300 --> 00:13:53.000
Just need to plug my cable.

255
00:13:54.200 --> 00:13:56.400
USB cable another device has been

256
00:13:57.200 --> 00:14:00.200
activated just again select device and click on

257
00:14:00.200 --> 00:14:03.100
 the esp32 Smart Lock. And now you see we are

258
00:14:03.100 --> 00:14:06.900
 good to go with that. Click on the open and the log

259
00:14:06.900 --> 00:14:09.000
 goes back and click on

260
00:14:09.100 --> 00:14:13.200
 the close lock and then now lock has been released open

261
00:14:12.200 --> 00:14:15.700
 lock and the close and now

262
00:14:15.700 --> 00:14:18.700
 this is your custom overlap with

263
00:14:18.700 --> 00:14:21.500
 the help of MIT App Inventor. You didn't

264
00:14:21.500 --> 00:14:24.500
 need to pay a lot of money to mobile

265
00:14:24.500 --> 00:14:28.500
 app developer. You can just fail a beautiful UI

266
00:14:27.500 --> 00:14:31.000
 mobile app for your projects.

267
00:14:30.800 --> 00:14:33.900
 So guys, this is the complete demonstration

268
00:14:33.900 --> 00:14:35.400
 and that's why I

269
00:14:36.500 --> 00:14:39.400
Change my plan from blink app to

270
00:14:39.400 --> 00:14:42.300
 the MIT app and whatever because still blink is

271
00:14:42.300 --> 00:14:46.000
 the third party app. And by the way, they stop supporting

272
00:14:45.100 --> 00:14:48.100
 the Bluetooth and ble. That's why

273
00:14:48.100 --> 00:14:51.600
 I made a plan to develop app

274
00:14:51.600 --> 00:14:54.700
 in MIT app and windows. So you guys get some cool ideas

275
00:14:54.700 --> 00:14:57.100
 how to develop air by joining the

276
00:14:57.100 --> 00:15:00.100
 block and it's easy if you spend 10 to 15 minutes or

277
00:15:00.100 --> 00:15:04.600
 one hour you will understand how the system works. So this is

278
00:15:04.600 --> 00:15:07.600
 easy to select the devices open

279
00:15:07.600 --> 00:15:10.200
 close lock, and I hope you guys

280
00:15:10.200 --> 00:15:13.800
 will automate your home covers or home tours

281
00:15:13.800 --> 00:15:16.800
 or something interesting, please I'll share

282
00:15:16.800 --> 00:15:19.300
 your projects with me in the messy box. So guys in

283
00:15:19.300 --> 00:15:22.200
 the next video. We're going to talk about pros and the cons of Bluetooth.

284
00:15:22.200 --> 00:15:24.500
 So see you in the next video. Have a good day, bye-bye.
