Preface |
|
xi | |
Acknowledgments |
|
xiii | |
Authors |
|
xv | |
Section I Introduction |
|
|
1 Introduction to Internet of Things |
|
|
3 | (10) |
|
1.1 Characteristics of IoT |
|
|
3 | (1) |
|
1.2 Design Principles of IoT |
|
|
4 | (1) |
|
1.3 IoT Architecture and Protocols |
|
|
5 | (4) |
|
|
5 | (1) |
|
|
6 | (15) |
|
|
6 | (1) |
|
1.3.2.2 Organizational Levels |
|
|
7 | (2) |
|
1.4 Enabling Technologies for IoT |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (2) |
|
|
13 | (6) |
|
2.1 Sensors Classification |
|
|
13 | (2) |
|
2.2 Working Principle of Sensors |
|
|
15 | (2) |
|
2.3 Criteria to Choose a Sensor |
|
|
17 | (1) |
|
2.4 Generation of Sensors |
|
|
17 | (2) |
|
|
19 | (10) |
|
|
19 | (1) |
|
3.2 Challenges in IoT Design |
|
|
20 | (1) |
|
3.3 IoT System Management |
|
|
20 | (1) |
|
|
21 | (8) |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
23 | (1) |
|
|
23 | (1) |
|
3.4.9 Ayla's IoT Cloud Fabric |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
23 | (1) |
|
3.4.12 Arrayent Connect TM |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
24 | (1) |
|
3.4.18 Jasper Control Center |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
25 | (1) |
|
3.4.25 Microsoft Research Lab of Things |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
26 | (1) |
|
|
26 | (3) |
Section II Basics of Arduino and Raspberry Pi |
|
|
|
29 | (16) |
|
4.1 Introduction to Arduino |
|
|
29 | (4) |
|
|
29 | (1) |
|
|
30 | (1) |
|
|
31 | (2) |
|
|
33 | (4) |
|
4.2.1 Steps to Install Arduino IDE |
|
|
33 | (4) |
|
4.3 Basic Commands for Arduino |
|
|
37 | (1) |
|
|
37 | (1) |
|
4.5 Serial Communication Commands |
|
|
38 | (1) |
|
4.6 Play with LED and Arduino |
|
|
38 | (2) |
|
|
40 | (1) |
|
4.7 Play with LCD with Arduino |
|
|
40 | (5) |
|
|
43 | (2) |
|
|
45 | (54) |
|
5.1 Introduction to Raspberry Pi |
|
|
45 | (3) |
|
5.1.1 Raspberry Pi Components |
|
|
45 | (3) |
|
5.2 Installation of NOOBS on SD Card |
|
|
48 | (1) |
|
5.3 Installation of Raspbian on SD Card |
|
|
49 | (2) |
|
|
51 | (1) |
|
5.5 Installation of Libraries on Raspberry Pi |
|
|
52 | (1) |
|
5.6 Getting the Static IP Address of Raspberry Pi |
|
|
52 | (5) |
|
5.7 Run a Program on Raspberry Pi |
|
|
57 | (1) |
|
|
57 | (1) |
|
5.8 Installing the Remote Desktop Server |
|
|
58 | (1) |
|
|
59 | (1) |
|
5.9.1 Testing of the Camera |
|
|
59 | (1) |
|
5.9.2 Raspberry Pi Camera as a USB Video Device |
|
|
59 | (1) |
|
5.10 Face Recognition Using Raspberry Pi |
|
|
60 | (1) |
|
5.11 Installation of I2C Driver on Raspberry Pi |
|
|
60 | (3) |
|
5.12 Serial Peripheral Interface with Raspberry Pi |
|
|
63 | (1) |
|
5.13 Programming a Raspberry Pi |
|
|
63 | (1) |
|
5.14 Play with LED and Raspberry Pi |
|
|
64 | (2) |
|
5.14.1 Recipe for LED Blink |
|
|
64 | (2) |
|
5.14.1.1 Recipe for LED Blink Using Function |
|
|
65 | (1) |
|
5.15 Reading the Digital Input |
|
|
66 | (1) |
|
|
67 | (1) |
|
5.16 Reading an Edge-Triggered Input |
|
|
67 | (3) |
|
5.16.1 Reading Switch in Pull-Down Configuration |
|
|
67 | (2) |
|
5.16.1.1 Recipe for Pull-Down Configuration |
|
|
68 | (1) |
|
5.16.2 Reading Switch in Pull-Up Configuration |
|
|
69 | (1) |
|
5.16.2.1 Recipe for Pull-Up Configuration |
|
|
70 | (1) |
|
5.17 Interfacing of Relay with Raspberry Pi |
|
|
70 | (2) |
|
|
71 | (1) |
|
5.18 Interfacing of DC Motor with Raspberry Pi |
|
|
72 | (3) |
|
|
73 | (1) |
|
5.18.2 Recipe to Control One Motor Using Function |
|
|
74 | (1) |
|
5.19 Interfacing of LCD with Raspberry Pi |
|
|
75 | (4) |
|
5.19.1 Adafruit Library for LCD |
|
|
76 | (1) |
|
5.19.2 Recipe with Adafruit Library |
|
|
76 | (1) |
|
5.19.3 Recipe without Library |
|
|
77 | (2) |
|
5.20 Interfacing LCD with Raspberry Pi in 12C Mode |
|
|
79 | (4) |
|
5.20.1 Recipe to Interface LCD in I2C Mode |
|
|
81 | (2) |
|
5.21 Interfacing of DHT11 Sensor with Raspberry Pi |
|
|
83 | (3) |
|
5.21.1 Recipe to Read DHT11 Sensor |
|
|
85 | (1) |
|
5.21.2 Recipe to Read DHT11 Sensor and Display Data on LCD |
|
|
85 | (1) |
|
5.22 Interfacing of Ultrasonic Sensor with Raspberry Pi |
|
|
86 | (4) |
|
5.22.1 Recipe to Read Ultrasonic Sensor and Display Data on LCD |
|
|
88 | (2) |
|
5.23 Interfacing of Camera with Raspberry Pi |
|
|
90 | (9) |
|
5.23.1 Configuring the Camera with Raspberry Pi |
|
|
90 | (1) |
|
5.23.2 Capturing the Image with Pi Camera |
|
|
90 | (3) |
|
5.23.3 Capturing the Video with Pi Camera |
|
|
93 | (2) |
|
5.23.4 Motion Detector and Capturing the Image |
|
|
95 | (5) |
|
5.23.4.1 Recipe to Capture Image on Motion Detection |
|
|
96 | (3) |
Section III Interfacing with Raspberry Pi and Arduino |
|
|
6 Raspberry Pi and Arduino |
|
|
99 | (16) |
|
6.1 Install Arduino IDE on Raspberry Pi |
|
|
99 | (1) |
|
6.2 Play with Digital Sensor |
|
|
100 | (4) |
|
|
100 | (1) |
|
|
101 | (1) |
|
|
102 | (2) |
|
6.3 Play with Analog Sensor |
|
|
104 | (3) |
|
|
104 | (1) |
|
|
105 | (2) |
|
|
107 | (8) |
|
|
107 | (3) |
|
|
107 | (2) |
|
|
109 | (1) |
|
|
110 | (6) |
|
|
111 | (1) |
|
|
112 | (3) |
|
7 Python and Arduino with Pyfirmata |
|
|
115 | (14) |
|
|
115 | (1) |
|
7.2 Controlling Arduino with Python |
|
|
116 | (1) |
|
|
116 | (1) |
|
|
117 | (1) |
|
7.4 Reading an Arduino Digital Input with Pyfirmata |
|
|
117 | (3) |
|
7.4.1 Recipe to Read Pull-Down Arrangement |
|
|
119 | (1) |
|
7.4.2 Recipe to Read Pull-Up Arrangement |
|
|
119 | (1) |
|
7.5 Reading the Flame Sensor with Pyfirmata |
|
|
120 | (1) |
|
7.5.1 Program for Reading Active "Low" Flame Sensor |
|
|
121 | (1) |
|
7.6 Reading an Analog Input with Pyfirmata |
|
|
121 | (2) |
|
|
122 | (1) |
|
7.7 Reading the Temperature Sensor with Pyfirmata |
|
|
123 | (1) |
|
|
124 | (1) |
|
7.8 Line-Following Robot with Pyfirmata |
|
|
124 | (5) |
|
|
125 | (4) |
|
8 Python GUI with Tkinter and Arduino |
|
|
129 | (16) |
|
8.1 Tkinter for GUI Design |
|
|
129 | (1) |
|
|
129 | (4) |
|
8.2.1 Recipe for LED Blinking with Fixed Time Delay |
|
|
131 | (1) |
|
8.2.1.1 Tkinter GUI for LED Blinking with Fixed Delay |
|
|
131 | (1) |
|
8.2.2 Recipe for LED Blinking with Variable Delay |
|
|
131 | (2) |
|
8.2.2.1 Tkinter GUI for LED Blinking with Variable Delay |
|
|
133 | (1) |
|
8.3 LED Brightness Control |
|
|
133 | (2) |
|
|
133 | (1) |
|
8.3.2 Tkinter GUI for LED Brightness Control |
|
|
134 | (1) |
|
8.4 Selection from Multiple Options |
|
|
135 | (2) |
|
|
136 | (1) |
|
|
137 | (1) |
|
|
137 | (3) |
|
8.5.1 Recipe to Read PIR Sensor |
|
|
137 | (3) |
|
|
140 | (1) |
|
8.6 Reading an Analog Sensor |
|
|
140 | (5) |
|
|
141 | (2) |
|
|
143 | (2) |
|
9 Data Acquisition with Python and Tkinter |
|
|
145 | (12) |
|
|
145 | (1) |
|
|
146 | (1) |
|
9.3 Storing Arduino Data with CSV File |
|
|
147 | (2) |
|
|
148 | (1) |
|
9.4 Plotting Random Numbers Using Matplotlib |
|
|
149 | (1) |
|
|
150 | (1) |
|
9.5 Plotting Real-Time from Arduino |
|
|
150 | (2) |
|
|
151 | (1) |
|
9.6 Integrating the Plots in the Tkinter Window |
|
|
152 | (5) |
|
|
152 | (5) |
Section IV Connecting to the Cloud |
|
|
|
157 | (20) |
|
10.1 DHT11 Data Logger with ThingSpeak Server |
|
|
157 | (3) |
|
10.1.1 Installation of DHT11 Library |
|
|
157 | (1) |
|
10.1.2 Steps to Create a Channel in ThingSpeak |
|
|
157 | (3) |
|
|
160 | (1) |
|
10.2 Ultrasonic Sensor Data Logger with ThingSpeak Server |
|
|
160 | (2) |
|
|
161 | (1) |
|
10.3 Air Quality Monitoring System and Data Logger with ThingSpeak Server |
|
|
162 | (7) |
|
|
166 | (3) |
|
10.4 Landslide Detection and Disaster Management System |
|
|
169 | (4) |
|
|
171 | (2) |
|
10.5 Smart Motion Detector and Upload Image to gmail.com |
|
|
173 | (4) |
|
10.5.1 Configuring Raspberry Pi with Camera and Gmail |
|
|
174 | (1) |
|
|
175 | (2) |
|
11 Blynk Application with Raspberry Pi |
|
|
177 | (6) |
|
11.1 Introduction to Blynk |
|
|
177 | (1) |
|
11.1.1 Installing Blynk on Raspberry Pi |
|
|
177 | (1) |
|
11.2 Creating New Project with Blynk |
|
|
178 | (2) |
|
11.3 Home Appliance Control with Blynk App |
|
|
180 | (3) |
|
12 Cayenne Application with Raspberry Pi |
|
|
183 | (4) |
|
12.1 Introduction to Cayenne |
|
|
183 | (1) |
|
12.1.1 Getting Started with Cayenne |
|
|
183 | (1) |
|
12.2 LED Blynk with the Cayenne App |
|
|
183 | (4) |
Bibliography |
|
187 | (2) |
Index |
|
189 | |