A DIY Smart Home Guide: Tools for Automating Your Home Monitoring and Security Using Arduino, ESP8266, and Android Robert Chin download
A DIY Smart Home Guide: Tools for Automating Your Home Monitoring and Security Using Arduino, ESP8266, and Android Robert Chin download
or textbooks at https://ebookmass.com
_____ Follow the link below to get your download now _____
https://ebookmass.com/product/a-diy-smart-home-guide-tools-
for-automating-your-home-monitoring-and-security-using-
arduino-esp8266-and-android-robert-chin/
https://ebookmass.com/product/find-your-way-home-jackie-ashenden-2/
https://ebookmass.com/product/find-your-way-home-jackie-ashenden-3/
https://ebookmass.com/product/find-your-way-home-jackie-ashenden/
https://ebookmass.com/product/arduino-and-raspberry-pi-sensor-
projects-for-the-evil-genius-1st-edition-chin/
Home for the Holidays Terry Spear [Spear
https://ebookmass.com/product/home-for-the-holidays-terry-spear-spear/
Home Sweet Home (Burgers and Brew Crüe Book 6) Lacey Black
https://ebookmass.com/product/home-sweet-home-burgers-and-brew-crue-
book-6-lacey-black/
https://ebookmass.com/product/a-home-from-home-children-and-social-
care-in-victorian-and-edwardian-britain-1870-1920-claudia-soares/
https://ebookmass.com/product/the-coronavirus-manual-for-parents-a-
guide-to-behavior-fear-claustrophobia-and-hope-at-home-thomas-phelan/
Contents
1. Cover
2. Title Page
3. Copyright Page
4. About the Author
5. About the Source Code and Project files
6. Contents
7. 1 Introduction to the Arduino
1. What Is an Arduino?
2. Why the Arduino Mega 2560?
3. The Arduino Mega 2560 Specifications
4. The Official Arduino Mega 2560
5. Arduino Mega 2560 Components
6. Overview of the C/C++ Language for the Arduino
7. Arduino Development System Requirements
8. Hands-on Example: A Simple Arduino “Hello World”
Program with an LED
9. Summary
Guide
1. Cover
2. Title Page
3. A DIY Smart Home Guide: Tools for Automating Your Home
Monitoring and Security Using Arduino, ESP8266, and Android
Page List
1. i
2. ii
3. iii
4. iv
5. v
6. vi
7. vii
8. viii
9. ix
10. x
11. xi
12. xii
13. xiii
14. xiv
15. 1
16. 2
17. 3
18. 4
19. 5
20. 6
21. 7
22. 8
23. 9
24. 10
25. 11
26. 12
27. 13
28. 14
29. 15
30. 16
31. 17
32. 18
33. 19
34. 20
35. 21
36. 22
37. 23
38. 24
39. 25
40. 26
41. 27
42. 28
43. 29
44. 30
45. 31
46. 32
47. 33
48. 34
49. 35
50. 36
51. 37
52. 38
53. 39
54. 40
55. 41
56. 42
57. 43
58. 44
59. 45
60. 46
61. 47
62. 48
63. 49
64. 50
65. 51
66. 52
67. 53
68. 54
69. 55
70. 56
71. 57
72. 58
73. 59
74. 60
75. 61
76. 62
77. 63
78. 64
79. 65
80. 66
81. 67
82. 68
83. 69
84. 70
85. 71
86. 72
87. 73
88. 74
89. 75
90. 76
91. 77
92. 78
93. 79
94. 80
95. 81
96. 82
97. 83
98. 84
99. 85
100. 86
101. 87
102. 88
103. 89
104. 90
105. 91
106. 92
107. 93
108. 94
109. 95
110. 96
111. 97
112. 98
113. 99
114. 100
115. 101
116. 102
117. 103
118. 104
119. 105
120. 106
121. 107
122. 108
123. 109
124. 110
125. 111
126. 112
127. 113
128. 114
129. 115
130. 116
131. 117
132. 118
133. 119
134. 120
135. 121
136. 122
137. 123
138. 124
139. 125
140. 126
141. 127
142. 128
143. 129
144. 130
145. 131
146. 132
147. 133
148. 134
149. 135
150. 136
151. 137
152. 138
153. 139
154. 140
155. 141
156. 142
157. 143
158. 144
159. 145
160. 146
161. 147
162. 148
163. 149
164. 150
165. 151
166. 152
167. 153
168. 154
169. 155
170. 156
171. 157
172. 158
173. 159
174. 160
175. 161
176. 162
177. 163
178. 164
179. 165
180. 166
181. 167
182. 168
183. 169
184. 170
185. 171
186. 172
187. 173
188. 174
189. 175
190. 176
191. 177
192. 178
193. 179
194. 180
195. 181
196. 182
197. 183
198. 184
199. 185
200. 186
201. 187
202. 188
203. 189
204. 190
205. 191
206. 192
207. 193
208. 194
209. 195
210. 196
211. 197
212. 198
213. 199
214. 200
215. 201
216. 202
217. 203
218. 204
219. 205
220. 206
221. 207
222. 208
223. 209
224. 210
225. 211
226. 212
227. 213
228. 214
229. 215
230. 216
231. 217
232. 218
233. 219
234. 220
235. 221
236. 222
237. 223
238. 224
239. 225
240. 226
241. 227
242. 228
243. 229
244. 230
245. 231
246. 232
247. 233
248. 234
249. 235
250. 236
251. 237
252. 238
253. 239
254. 240
255. 241
256. 242
257. 243
258. 244
259. 245
260. 246
261. 247
262. 248
263. 249
264. 250
265. 251
266. 252
267. 253
268. 254
269. 255
270. 256
271. 257
272. 258
273. 259
274. 260
275. 261
276. 262
277. 263
278. 264
279. 265
280. 266
281. 267
282. 268
283. 269
284. 270
285. 271
286. 272
287. 273
288. 274
289. 275
290. 276
291. 277
292. 278
293. 279
294. 280
295. 281
296. 282
297. 283
298. 284
299. 285
300. 286
301. 287
302. 288
303. 289
304. 290
305. 291
306. 292
307. 293
308. 294
309. 295
310. 296
311. 297
312. 298
313. 299
314. 300
315. 301
316. 302
317. 303
318. 304
319. 305
320. 306
321. 307
322. 308
323. 309
324. 310
325. 311
326. 312
327. 313
328. 314
329. 315
330. 316
331. 317
332. 318
333. 319
334. 320
335. 321
336. 322
337. 323
338. 324
339. 325
340. 326
341. 327
342. 328
343. 329
344. 330
345. 331
346. 332
347. 333
348. 334
349. 335
350. 336
351. 337
352. 338
353. 339
354. 340
355. 341
356. 342
357. 343
358. 344
359. 345
360. 346
361. 347
362. 348
363. 349
364. 350
365. 351
366. 352
367. 353
368. 354
369. 355
370. 356
371. 357
372. 358
373. 359
374. 360
375. 361
376. 362
377. 363
378. 364
379. 365
380. 366
381. 367
382. 368
383. 369
384. 370
385. 371
386. 372
387. 373
388. 374
389. 375
390. 376
391. 377
392. 378
393. 379
394. 380
395. 381
396. 382
397. 383
398. 384
399. 385
400. 386
401. 387
402. 388
403. 389
404. 390
405. 391
406. 392
407. 393
408. 394
409. 395
410. 396
411. 397
412. 398
413. 399
414. 400
415. 401
416. 402
417. 403
418. 404
419. 405
420. 406
421. 407
422. 408
423. 409
424. 410
425. 411
426. 412
427. 413
428. 414
429. 415
430. 416
431. 417
432. 418
433. 419
434. 420
435. 421
436. 422
437. 423
438. 424
439. 425
440. 426
441. 427
442. 428
443. 429
444. 430
445. 431
446. 432
447. 433
448. 434
449. 435
450. 436
451. 437
452. 438
453. 439
454. 440
455. 441
456. 442
457. 443
458. 444
459. 445
460. 446
461. 447
462. 448
463. 449
464. 450
465. 451
466. 452
467. 453
468. 454
469. 455
470. 456
471. 457
472. 458
473. 459
474. 460
475. 461
Copyright © 2020 by McGraw-Hill Education. All rights
reserved. Except as permitted under the United States
Copyright Act of 1976, no part of this publication may be
reproduced or distributed in any form or by any means, or
stored in a database or retrieval system, without the prior
written permission of the publisher.
ISBN: 978-1-26-045614-1
MHID: 1-26-045614-5
TERMS OF USE
The source code and Android APK files for this book are located
at:
https://www.mhprofessional.com/Chin_SmartHome
What Is an Arduino?
Summary
The NodeMCU
Summary
What Is Android?
Summary
Class Overview
The WifiMessageHandler Class Constructor
Summary
Summary
Arduino Cameras
Summary
Summary
Summary
Summary
Index
CHAPTER 1
WHAT IS AN ARDUINO?
The Arduino is an open-source microcontroller that uses the C
and C++ languages to control digital and analog outputs to
devices and electronics components and to read in digital and
analog inputs from other devices and electronics components
for processing. For example, the Arduino can read in
information from a sensor to a home security system that would
detect the heat that a human being emits and sends a signal to
the Arduino to indicate that a human is in front of the sensor.
After receiving this information the Arduino can send
commands to a camera to start taking pictures of the intruder or
intruders and save these images to an SD card for later viewing.
It can also transmit a message over Wi-Fi to an Android cell
phone so that a text alarm notification message is sent to the
homeowner. The official web site of the Arduino is
http://www.arduino.cc.
Operating voltage: 5 V
SRAM: 8 kB
EEPROM: 4 kB
Length: 101.52 mm
Width: 53.3 mm
Weight: 37 g
Reset Button
There is a Reset button on the Arduino Mega 2560 where you
can press the button down to reset the board. This restarts the
program contained in the Arduino’s memory. See Figure 1-5.
Figure 1-5 The Reset button on the Arduino Mega 2560.
“Mr. Samuel Johnson said that all sceptical innovators were vain
men; and finding mankind allready (sic) in possession of Truth, they
found they could not gratify their vanity in supporting her, and so
they have taken to error. Truth (said he) is a cow which will yield
such people no more milk, and so they are gone to milk the bull.”
I was present.
“When Derrick was made King of Bath, Mr. Samuel Johnson said,
‘Derry may do very well while he can outrun his character, but the
moment that his character gets up with him he is gone.’”
I was present.
“During a hot action between the French and the allied armies, in
which the former were defeated, a French grenadier was taken
prisoner by an officer of the Iniskilling [Enniskillin] dragoons. He
immediately demanded of the prisoner, ‘Where is Marshal Broglio?’
The brave grenadier replied, with the high spirit of a French soldier,
‘Il est partout.’ He is everywhere.”
M. Giffardier, from the Officer.
“As a strong picture of the difference between French and
German manners, the following story will serve: An English officer in
Germany during the war kept a girl. She had a great deal of spirit,
and for a frolic she would pay a visit to the enemy’s outpost. She
first came to a French centinel, who seeing a pretty—nay, elegant
lady coming towards him, immediately grounded his arms, pulled off
his hat, and with all the politeness in the world saluted her with ‘Ah,
madame, je suis charmé,’ &c. She put out her hand, which he kissed
with great gallantry. She then went to a German centinel in the
French service. When he observed her approaching, he looked stern
and shoved her back with his hand; and when she attempted still to
advance, he held out his fusil. She ran briskly off, crying, ‘You brute,
we have taken Cassel!’”
“Boswell says that a man who sets out on the journey of life with
opinions that he has never examined is like a man who goes a-
fowling with a gun that has never been proved.”
“Boswell, who had a good deal of whim, used not only to form
wild projects in his imagination, but would sometimes reduce them
to practice. In his calm hours he said with great good humour,
‘There have been many people who built castles in the air, but I
believe I am the first that ever attempted to live in them.’”
“A gentleman said of a clumsy wench that she was as hot as fire.
‘Yes,’ said Boswell, ‘but in a very different way. The fire feels nothing,
but communicates the heat to other bodies; but this wench leaves
all cold around her while she herself is burning.’”
“When Boswell had the rage of getting into the Guards, he talked
of it to John Home,[151] whose poetry breathed a martial spirit, and
therefore might approve his desire to be a soldier. ‘Sir,’ said John
Home, ‘the Guards are no soldiers; they are just beefeaters, only
they don’t eat beef.’”
“Boswell was at Leyden in the year 1764. The Hon. Charles
Gordon[152] said to him with affected diffidence, in order to receive
a compliment, ‘Mr. Boswell, I would willingly come and see you for a
day at Utrecht, but I am afraid I should tire you.’ ‘Sir,’ replied
Boswell, ‘I defy you to tire me for one day.’”
“After the battle of Colline, where the King of Prussia was sadly
defeated, his Majesty stood in a musefull melancholy, and looked
through his glass at a battery of cannon which was still playing and
was within reach of him. His troops had all retired, only the Scots
General Grant stood behind him at a little distance; a cannon bullet
took away the skirt of his coat, and at last when he found that the
King made no preparation to retire, he came up to him and said,
‘Est-ceque votre majeste veut prendre la batterie tout seul?’ The
King looked at him with approbation, and said, ‘Allons, mon ami,’ and
retreated. ‘Eh bien, Grant,’ said he, ‘c’est une triste affaire.’”
Mr. Secretary Burnet.[153]
“Mr. Burnet was one day riding along with the Prussian army
through a wood. He heard behind him a voice crying, ‘March furt in
der Deivells naam,’ but did not think that the King had been near
him. He turned about, however, and there was his Majesty’s horse’s
mouth touching Burnet’s horse’s tail. The King had lost a battle. The
weather was bad. He was muffled up in his great-coat, was in very
bad humour, and looked confoundedly sulky. Burnet was anxious to
make way for him, and immediately put spurs to his horse and
sprung away. The wood was so thick that the branches caught hold
of him and drove off his hat and wig. He had shaved his head that
morning, so that there he was, he sticking with his white skull
exposed to the elements. The King, notwithstanding his ill-humour,
could not help being diverted, and burst out into an immense fit of
laughter. He then said to Burnet, ‘Monsieur, je vous demande
pardon, mais je m’en vais le reparer.’ He then called to a soldier,
‘Geve die Heer syn Hoed en zyn peruik.’”
Mr. Secretary Burnet.
“The British Envoy’s mail was once seized going from Berlin. It
was said to have been done by the Ambassador of France. Mr.
Mitchell said,[154] ‘Je n’en crois rien.’ ‘Peut être,’ said one, ‘il a reçu
des ordres pour le faire et qu’est ce que cela feroit,’ said Mitchell.
‘Monsieur,’ said the gentleman, ‘si vous aviéz reçu des ordres du Roi
votre maître de saisir une Malle ne voudriez vous pas le faire?’
‘Monsieur,’ replied Mr. Mitchell, ‘Premierrement le Roi mon maître ne
me donnera jamais des telles ordres. En second lieu, assurement je
ne les obeierois pas, “non,” je lui ecrirois, Si vous, Sire, voulez faire
des choses comme cela, il faut envoyer un voleur, et non pas tacher
de faire un voleur de votre Envoye.’”
Mr. Mitchell himself.
“Lord Auchinleck and his son were very different men. My lord
was sollid (sic) and composed; Boswell was light and restless. My
lord rode very slow; Boswell was one day impatient to get on, and
begged my lord to ride a little faster; ‘for,’ said he, ‘it is not the
exercise which fatigues, but the hinging upon a beast.’ His father
replied, ‘What’s the matter, man, how a chield hings, if he dinna hing
upon a gallows?’”
“Boswell said that Sir Joseph Yorke was so anxious lest people
should forget that he was an ambassador, that he held his head as
high and spoke as little as possible. As in the infancy of painting it
was found necessary to write below a picture, this is a cow, or this is
a horse, so from the mouth of Sir Joe cometh a label with these
words—‘I am an ambassador.’”
“When Boswell came first into Italy, and saw the extreme
profligacy of the ladies, he said, ‘Italy has been called the garden of
Europe, I think it is the Covent Garden.’”
“Boswell had a travelling box in which he carried his hats and his
papers. He was saying one day, ‘What connection now have they
together?’ Replied Mr. Lumisden,[170] ‘They have both a connection
with your head.’”
“An honest Scots sailor who had been wounded in the service
took up a public-house at Dundee, and on his sign had his story
painted. First he was drawn with both his legs firing away, with this
inscription,—‘Thus I was;’ then with one leg, and inscribed, ‘Thus I
am, the Fortune of war.’”
James Ramsay.[171]
Mr. Willison.[172]
“A young fellow by chance let a china plate fall. His father asked
him, ‘Pray, sir, what way did you do that?’ He very gravely took up
another, and let it fall in the same manner: ‘That way, sir.’”
Colonel Edmonstoune.[173]
“A sailor, who had been long out at sea, was on his return asked
by a companion what sort of voyage they had. ‘Why,’ said he, ‘a very
good one; only we had prayers twice. But one of the times there
was no more occasion for them than if you and I should fall down
and pray this minute.’”
Lord Loudoun.[175]
“My Lord Stair,[176] who wrote a very bad hand, sent once to my
Lord Loudoun a written commission to be read to Sir Philip
Honeywood.[177] Lord Loudoun received the letter at the British
Coffee-house, where he was sitting after dinner with some friends
taking a very hearty bottle; and whether the wine made him see
double or no, so it was that he read the commission very distinctly.
Next morning he went to wait on Sir Philip Honeywood, and being
then quite cool and in his sober senses he could not read a word of
it, and neither could Sir Philip. Lord Loudoun could not go back to
Lord Stair and tell him his hand was not legible, so Sir Philip trusted
to Lord Loudoun’s memory of what he had read the day before, and
could not then read at all, a most curious fact. When the Duke of
Cumberland was told of it he said, ‘Loudoun, why did you not stay
and dine with Sir Philip, and then you would both have read it.’”
Lord Loudoun.
“Mr. Clark, uncle to Baron Clark, a most curious mortal, who had
been bred a surgeon, had travelled over the greatest part of the
world, and always walked. He had the misfortune to break one of his
legs, and two pieces of the bone came out of it. He had them drest,
and made hafts to a knife and fork of them. When he was dying he
sent for Doctor Clark[178] and the Baron.[179] ‘Now, gentlemen,’ said
he, ‘this knife and fork will be the most valuable part of my
executory, and I’ll leave them to any of you two who shall give me
the best inscription to put upon them. The Doctor, who was a fine
classical scholar, tried a good many times, but at length the baron
fairly got the better of him by a most elegant and well-adapted
inscription,—
‘Quæ terra nostri non plena laboris?’”
Lord Auchinleck.
“Dr. Taylor, the oculist, was one evening supping at William Earl
of Dumfries’s, at Edinburgh. He harangued with his usual fluency
and impudence, and boasted that he knew the thoughts of
everybody by looking at their eyes. The first Lady Dumfries,[187]
who was hurt with his behaviour, asked him with a smile of
contempt, ‘Pray, sir, do you know what I am thinking?’ ‘Yes, madam,’
said he. ‘Then,’ replied the countess, ‘it’s very safe, for I am sure you
will not repeat it.’”
Dr. Webster, who was present.
ebookmasss.com