Acknowledgments |
|
xv | |
Introduction |
|
xvii | |
What Is This Book All About? |
|
xviii | |
What's In The Book |
|
xviii | |
What You'll Need For This Book |
|
xxi | |
Chapter 1 Getting Started With The Raspberry Pi |
|
1 | (34) |
|
|
2 | (1) |
|
The Raspberry Pi's Hardware |
|
|
2 | (4) |
|
|
4 | |
|
|
3 | (2) |
|
|
5 | (1) |
|
Setting Up Your Raspberry Pi |
|
|
6 | (14) |
|
Downloading The Operating System |
|
|
7 | (1) |
|
Installing The Operating System |
|
|
8 | (1) |
|
Setting Up Your Pi Equipment |
|
|
9 | (1) |
|
|
9 | (1) |
|
Configuring Your Raspberry Pi |
|
|
10 | (2) |
|
A Quick Tour Of The Raspbian Operating System |
|
|
12 | (2) |
|
Configuring Your Raspberry Pi |
|
|
14 | (4) |
|
|
18 | (2) |
|
|
20 | (4) |
|
|
22 | (1) |
|
Accessing The Configuration Settings |
|
|
23 | (1) |
|
|
23 | (1) |
|
Installing Software Packages |
|
|
24 | (1) |
|
Accessing Your Raspberry Pi Remotely |
|
|
24 | (7) |
|
Accessing The Raspberry Pi Via SSH |
|
|
25 | (2) |
|
Accessing The Raspberry Pi Via VNC Using RealVNC |
|
|
27 | (3) |
|
Accessing The Raspberry Pi Via Remote Desktop |
|
|
30 | (1) |
|
|
31 | (2) |
|
|
33 | (2) |
Chapter 2 Python Programming |
|
35 | (14) |
|
|
36 | (1) |
|
Introducing Thonny And Idle |
|
|
36 | (2) |
|
Writing Your First Program |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
39 | (1) |
|
|
40 | (2) |
|
|
41 | (1) |
|
|
42 | (1) |
|
|
42 | (1) |
|
|
43 | (1) |
|
Running Python Code From The Terminal |
|
|
44 | (1) |
|
Common Programming Mistakes |
|
|
44 | (3) |
|
|
45 | (1) |
|
|
45 | (2) |
|
|
47 | (1) |
|
|
47 | (2) |
Chapter 3 Hot Glue Night-Light |
|
49 | (12) |
|
|
50 | (1) |
|
Building The Custom Night-Light |
|
|
51 | (4) |
|
|
53 | (2) |
|
|
55 | (1) |
|
|
55 | (1) |
|
Building The LED Night-Light |
|
|
55 | (4) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
58 | (1) |
|
|
59 | (2) |
Chapter 4 The Pi Camera: Selfie Snapper |
|
61 | (22) |
|
|
62 | (1) |
|
Versions And Specifications |
|
|
62 | (1) |
|
Photography With The Pi Camera |
|
|
63 | (13) |
|
Setting Up The Hardware And Software |
|
|
63 | (5) |
|
|
68 | (5) |
|
Triggering The Camera With A Button |
|
|
73 | (3) |
|
Videos With The Pi Camera |
|
|
76 | (6) |
|
|
76 | (1) |
|
|
77 | (1) |
|
Playing The Video On A Computer Or Other Device |
|
|
77 | (1) |
|
Creating A Time-Lapse Video |
|
|
78 | (4) |
|
|
82 | (1) |
Chapter 5 : Pi Spy Part 1: Hacking Webcams For Secret Surveillance |
|
83 | (14) |
|
|
84 | (1) |
|
|
84 | (3) |
|
Streaming A Video From The Webcam |
|
|
87 | (3) |
|
Live Streaming To A Device |
|
|
90 | (4) |
|
Stopping And Restarting Motion |
|
|
94 | (1) |
|
|
95 | (2) |
Chapter 6 Manipulating Minecraft |
|
97 | (18) |
|
|
98 | (1) |
|
Minecraft On The Raspberry Pi |
|
|
98 | (3) |
|
|
98 | (2) |
|
Finding Yourself: Using The X-, Y-, And Z- Coordinates |
|
|
100 | (1) |
|
|
101 | (1) |
|
Posting A Message To Chat |
|
|
101 | (1) |
|
Coding The Chat Messenger |
|
|
102 | (1) |
|
|
102 | (1) |
|
|
102 | (2) |
|
Coding The Trampoline Grass |
|
|
103 | (1) |
|
|
104 | (1) |
|
|
104 | (1) |
|
|
104 | (3) |
|
Coding The Sand Drop Game |
|
|
105 | (1) |
|
|
106 | (1) |
|
|
106 | (1) |
|
|
107 | (2) |
|
|
107 | (1) |
|
|
108 | (1) |
|
|
108 | (1) |
|
Camera Surveillance Minecraft Towers |
|
|
109 | (5) |
|
Building The Three Trigger Towers |
|
|
110 | (1) |
|
|
111 | (3) |
|
|
114 | (1) |
|
|
114 | (1) |
Chapter 7 Radio Invasion |
|
115 | (14) |
|
|
116 | (1) |
|
Preparing The Raspberry Pi |
|
|
116 | (2) |
|
|
118 | (1) |
|
Streaming An Mp3 Music File |
|
|
119 | (1) |
|
Recording And Broadcasting Your Own File |
|
|
120 | (3) |
|
Setting Up Your Microphone And Speakers |
|
|
120 | (1) |
|
Making And Playing Your Recording On The Raspberry Pi |
|
|
121 | (1) |
|
|
122 | (1) |
|
|
123 | (4) |
|
Creating The GUI Functions |
|
|
123 | (2) |
|
Creating The Window And Buttons |
|
|
125 | (2) |
|
|
127 | (1) |
|
|
128 | (1) |
Chapter 8 The Automatic Texting Machine |
|
129 | (12) |
|
|
130 | (1) |
|
|
130 | (1) |
|
Creating A Simple Text Sender |
|
|
130 | (3) |
|
Signing Up For A Twilio Account |
|
|
130 | (3) |
|
Setting Up A Twilio Phone Number |
|
|
133 | (3) |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
134 | (2) |
|
Creating The Automatic SMS Reminder Machine |
|
|
136 | (4) |
|
Setting Up And Validating The Format |
|
|
137 | (1) |
|
Coding The Reminder Message |
|
|
138 | (1) |
|
Matching Times And Sending The Message |
|
|
139 | (1) |
|
|
140 | (1) |
Chapter 9 Pi Spy Part 2: Wi-Fi And Bluetooth Tracking |
|
141 | (24) |
|
|
142 | (1) |
|
Creating Your Status Board |
|
|
143 | (3) |
|
|
143 | (1) |
|
Adding The LEDs To The Board |
|
|
143 | (1) |
|
Connecting The LEDs To The Raspberry Pi |
|
|
144 | (2) |
|
Attaching The Raspberry Pi |
|
|
146 | (1) |
|
Tracking Devices With IP Addresses |
|
|
146 | (1) |
|
|
147 | (1) |
|
Finding The IP Addresses Of Other Devices |
|
|
147 | (3) |
|
|
148 | (1) |
|
|
148 | (2) |
|
Writing The Status Board Code |
|
|
150 | (4) |
|
Setting Up And Identifying The First Device |
|
|
150 | (2) |
|
Finding The Rest Of The Devices |
|
|
152 | (1) |
|
Adding Delays, Responding To Data, And Adding The Button |
|
|
152 | (2) |
|
|
154 | (1) |
|
|
154 | (1) |
|
Setting Up The Code To Run Automatically |
|
|
154 | (3) |
|
Using Cron To Autostart The Program |
|
|
155 | (1) |
|
Rebooting To The Command Line |
|
|
156 | (1) |
|
Tracking Devices With Bluetooth |
|
|
157 | (6) |
|
|
158 | (1) |
|
Turning On The Raspberry Pi Bluetooth |
|
|
158 | (2) |
|
Writing The Status Board Code |
|
|
160 | (2) |
|
|
162 | (1) |
|
|
163 | (2) |
Chapter 10 Magic Music Box |
|
165 | (20) |
|
|
166 | (1) |
|
|
166 | (2) |
|
Building The Magic Music Box |
|
|
168 | (12) |
|
|
168 | (3) |
|
|
171 | (1) |
|
Coding The Magic Music Box |
|
|
172 | (7) |
|
|
179 | (1) |
|
Automatically Starting The Mp3 Player On Boot-Up |
|
|
180 | (3) |
|
|
180 | (2) |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
184 | (1) |
Chapter 11 Nature Box: Motion-Sensing Camera |
|
185 | (18) |
|
|
186 | (1) |
|
Setting Up The Passive Infrared Sensor |
|
|
186 | (3) |
|
|
187 | (1) |
|
|
187 | (2) |
|
|
189 | (1) |
|
|
189 | (1) |
|
Creating A New Folder To Store The Images |
|
|
190 | (1) |
|
|
190 | (2) |
|
Retrieving The Images From The Raspberry Pi |
|
|
192 | (3) |
|
Setting Up A Dropbox Account |
|
|
192 | (2) |
|
Installing Dropbox For Python |
|
|
194 | (1) |
|
Coding The Final Nature Box |
|
|
195 | (4) |
|
Setting Up The Final Program |
|
|
196 | (1) |
|
Combining The Camera And Sensor |
|
|
196 | (1) |
|
Creating The Try And Except |
|
|
197 | (1) |
|
Running The Motion Sensor |
|
|
198 | (1) |
|
Starting The Program Automatically |
|
|
199 | (2) |
|
|
201 | (1) |
|
|
202 | (1) |
Chapter 12 Smart Plugs For Smart Home Hacks |
|
203 | (12) |
|
|
204 | (1) |
|
Setting Up The Energenie Remote Plug |
|
|
205 | (1) |
|
|
206 | (2) |
|
Controlling The Lamp Remotely |
|
|
206 | (1) |
|
Flashing. The Lamp On And Off |
|
|
207 | (1) |
|
Using An App To Control The Plug |
|
|
208 | (3) |
|
|
211 | (3) |
|
|
211 | (1) |
|
Improving The Code To Switch On And Off |
|
|
212 | (2) |
|
|
214 | (1) |
Chapter 13 Mirror, Mirror: The Social Media Status Mirror |
|
215 | (28) |
|
|
216 | (1) |
|
|
217 | (4) |
|
|
217 | (1) |
|
Teaching The Pi To Read Text Out Loud |
|
|
218 | (1) |
|
|
218 | (1) |
|
|
219 | (1) |
|
|
220 | (1) |
|
|
221 | (1) |
|
Setting Up Your Twitter Developer Account |
|
|
221 | (6) |
|
Setting Up Your Twitter App |
|
|
227 | (3) |
|
Creating The Access Keys And Tokens |
|
|
229 | (1) |
|
Programming Your Raspberry Pi With The App |
|
|
230 | (6) |
|
|
230 | (2) |
|
|
232 | (1) |
|
Streaming Tweets Automatically |
|
|
233 | (3) |
|
|
236 | (4) |
|
Starting The Final Program |
|
|
236 | (1) |
|
Adding The Main Program Code |
|
|
237 | (2) |
|
Automatically Starting The Twitter Stream |
|
|
239 | (1) |
|
|
240 | (1) |
|
|
241 | (2) |
Chapter 14 Computer Games With The Sense HAT |
|
243 | |
|
|
245 | (1) |
|
|
245 | (1) |
|
Getting Started With The Sense HAT |
|
|
246 | (10) |
|
Scrolling Text Across The Sense HAT |
|
|
246 | (1) |
|
Taking A Temperature Reading |
|
|
247 | (1) |
|
Making A Real-Time Temperature Display |
|
|
248 | (1) |
|
|
249 | (1) |
|
Making A Magical Sparkle Screen |
|
|
250 | (1) |
|
Creating An Image With The LED Display |
|
|
251 | (2) |
|
Creating Images With The Grid Draw Program |
|
|
253 | (3) |
|
Building The Rock, Paper, Scissors, Lizard, Spock Game |
|
|
256 | (10) |
|
Importing Modules And Creating The Variables |
|
|
257 | (1) |
|
|
258 | (1) |
|
Setting Up The Player's Choice |
|
|
258 | (1) |
|
|
259 | (1) |
|
Notifying The Player Of Their Option Choice |
|
|
260 | (1) |
|
Coding The Raspberry Pi's Selection |
|
|
261 | (1) |
|
Displaying The Raspberry Pi's Choice |
|
|
262 | (1) |
|
|
262 | (2) |
|
|
264 | (1) |
|
|
264 | (2) |
|
|
266 | |