| Contents at a Glance |
|
iv | |
| Contents |
|
v | |
| About the Authors |
|
xvi | |
| About the Technical Reviewers |
|
xvii | |
| Acknowledgments |
|
xix | |
| Introduction |
|
xx | |
|
|
|
1 | (16) |
|
|
|
1 | (1) |
|
|
|
1 | (1) |
|
Practical Electronics for Software Developers |
|
|
1 | (16) |
|
Current, Voltage, and Power |
|
|
2 | (1) |
|
|
|
2 | (1) |
|
|
|
3 | (3) |
|
|
|
6 | (1) |
|
Ohm's Law and Current Limiting |
|
|
7 | (1) |
|
|
|
8 | (1) |
|
|
|
8 | (1) |
|
|
|
9 | (1) |
|
|
|
9 | (1) |
|
|
|
10 | (1) |
|
|
|
11 | (1) |
|
Capacitance and Capacitors |
|
|
11 | (1) |
|
|
|
11 | (1) |
|
|
|
12 | (1) |
|
|
|
13 | (1) |
|
|
|
13 | (1) |
|
|
|
13 | (1) |
|
|
|
14 | (1) |
|
|
|
15 | (2) |
|
|
|
17 | (20) |
|
|
|
17 | (2) |
|
|
|
19 | (15) |
|
Test and Investigate Appliance Remote |
|
|
19 | (2) |
|
Assemble Reed Relay Shield |
|
|
21 | (4) |
|
Connect Reed Relay Shield to Remote Control |
|
|
25 | (2) |
|
Create Reed Relay Control Program |
|
|
27 | (1) |
|
|
|
27 | (3) |
|
ApplianceRemoteControlCompact |
|
|
30 | (2) |
|
Test Reed Relay Shield and Sketch |
|
|
32 | (2) |
|
|
|
34 | (3) |
|
|
|
34 | (1) |
|
|
|
34 | (1) |
|
|
|
35 | (2) |
|
Time-Lapse Camera Controller |
|
|
37 | (14) |
|
|
|
37 | (2) |
|
|
|
39 | (10) |
|
Assemble Prototyping Shield |
|
|
39 | (1) |
|
Connect Camera Shutter Release |
|
|
39 | (1) |
|
Remote Shutter Release Connector |
|
|
40 | (2) |
|
|
|
42 | (1) |
|
|
|
43 | (1) |
|
|
|
44 | (1) |
|
|
|
44 | (1) |
|
Configure and Load Sketch |
|
|
44 | (4) |
|
|
|
48 | (1) |
|
|
|
48 | (1) |
|
|
|
48 | (1) |
|
|
|
48 | (1) |
|
|
|
48 | (1) |
|
|
|
49 | (1) |
|
|
|
49 | (2) |
|
|
|
51 | (12) |
|
|
|
51 | (2) |
|
|
|
53 | (8) |
|
Populate Prototyping Shield |
|
|
53 | (3) |
|
Prepare the UsbKeyboard Library |
|
|
56 | (1) |
|
Compile and Upload Sketch |
|
|
57 | (4) |
|
|
|
61 | (2) |
|
|
|
61 | (2) |
|
PS/2 Keyboard or Mouse Input |
|
|
63 | (18) |
|
|
|
63 | (1) |
|
|
|
64 | (16) |
|
|
|
65 | (1) |
|
Recycled 6-Pin Mini-DIN Sockets |
|
|
66 | (1) |
|
6-Pin Mini-DIN Panel Sockets |
|
|
67 | (2) |
|
|
|
69 | (4) |
|
|
|
73 | (3) |
|
|
|
76 | (3) |
|
|
|
79 | (1) |
|
Barcode Reader for a Stock Control System |
|
|
79 | (1) |
|
|
|
80 | (1) |
|
Security/Automation Sensors |
|
|
81 | (20) |
|
|
|
82 | (2) |
|
|
|
84 | (14) |
|
|
|
84 | (3) |
|
Assemble Four-Channel Alarm Sensor Shield |
|
|
87 | (5) |
|
Install End-of-Line Resistors on Sensor |
|
|
92 | (3) |
|
|
|
95 | (3) |
|
|
|
98 | (1) |
|
|
|
98 | (3) |
|
Visual Display Written in Processing |
|
|
98 | (1) |
|
|
|
99 | (1) |
|
Multiple Buttons on One Input |
|
|
99 | (2) |
|
|
|
101 | (20) |
|
|
|
101 | (2) |
|
|
|
103 | (5) |
|
Mount PCB Plugs on Shield |
|
|
103 | (2) |
|
|
|
105 | (1) |
|
|
|
106 | (2) |
|
|
|
108 | (11) |
|
|
|
119 | (2) |
|
|
|
121 | (18) |
|
|
|
122 | (1) |
|
|
|
123 | (16) |
|
How Resistive Touch Screens Work |
|
|
123 | (3) |
|
Basic Touch Screen Connection Test |
|
|
126 | (2) |
|
Arduino TouchScreen Library |
|
|
128 | (1) |
|
Controlling a ``Processing'' Program |
|
|
128 | (3) |
|
Construct Hardware for Home Automation Control Panel |
|
|
131 | (3) |
|
|
|
134 | (3) |
|
|
|
137 | (2) |
|
|
|
139 | (24) |
|
|
|
140 | (2) |
|
|
|
142 | (18) |
|
|
|
142 | (1) |
|
|
|
143 | (1) |
|
SpeakJet PWM ``Audio'' Output |
|
|
144 | (1) |
|
|
|
145 | (1) |
|
|
|
145 | (3) |
|
Making a Line-Level Output Cable |
|
|
148 | (1) |
|
|
|
149 | (2) |
|
Speech Synthesizer Software |
|
|
151 | (2) |
|
|
|
153 | (7) |
|
|
|
160 | (1) |
|
|
|
160 | (1) |
|
|
|
161 | (2) |
|
|
|
163 | (22) |
|
|
|
164 | (1) |
|
|
|
165 | (19) |
|
|
|
165 | (1) |
|
Prepare Prototyping Shield |
|
|
166 | (2) |
|
|
|
168 | (3) |
|
|
|
171 | (2) |
|
|
|
173 | (1) |
|
|
|
174 | (1) |
|
Configure, Compile, and Test Sketch |
|
|
175 | (1) |
|
|
|
175 | (1) |
|
|
|
176 | (2) |
|
|
|
178 | (5) |
|
|
|
183 | (1) |
|
|
|
184 | (1) |
|
|
|
184 | (1) |
|
|
|
184 | (1) |
|
|
|
184 | (1) |
|
Oscilloscope/Logic Analyzer |
|
|
185 | (24) |
|
|
|
187 | (2) |
|
|
|
189 | (20) |
|
|
|
190 | (3) |
|
Fit the Prototyping Shield |
|
|
193 | (1) |
|
|
|
194 | (1) |
|
How Successive Approximation ADC Works |
|
|
194 | (3) |
|
Connection to Circuit under Test |
|
|
197 | (1) |
|
Install Software in Arduino |
|
|
198 | (1) |
|
|
|
198 | (2) |
|
|
|
200 | (2) |
|
Digital Read Sketch with Optimized Communications Format |
|
|
202 | (1) |
|
Install Processing and Run Visualization Program |
|
|
203 | (2) |
|
|
|
205 | (1) |
|
|
|
205 | (1) |
|
|
|
206 | (3) |
|
|
|
209 | (30) |
|
|
|
210 | (2) |
|
|
|
212 | (24) |
|
|
|
213 | (2) |
|
Determine Sensor Installation Method |
|
|
215 | (4) |
|
Assemble the Sensor Housing |
|
|
219 | (4) |
|
Assemble the Arduino Housing |
|
|
223 | (3) |
|
Install the WiShield Library and Driver |
|
|
226 | (1) |
|
Load the Tank-Level Sketch |
|
|
227 | (4) |
|
|
|
231 | (3) |
|
Calibrating the ``Empty Tank'' Level |
|
|
234 | (1) |
|
Install the Sensor and Arduino |
|
|
235 | (1) |
|
Calibrating the ``Full Tank'' Level |
|
|
236 | (1) |
|
|
|
236 | (3) |
|
|
|
236 | (1) |
|
Control Pumps or Irrigation |
|
|
236 | (1) |
|
|
|
237 | (1) |
|
|
|
237 | (2) |
|
|
|
239 | (30) |
|
|
|
241 | (2) |
|
|
|
243 | (24) |
|
Test and Install the Weather Station |
|
|
243 | (1) |
|
Understanding the Circuit |
|
|
243 | (3) |
|
Assemble the Receiver Shield |
|
|
246 | (4) |
|
Weather Station Receiver Program |
|
|
250 | (15) |
|
|
|
265 | (2) |
|
|
|
267 | (2) |
|
Private Online Weather Station |
|
|
267 | (2) |
|
RFID Access Control System |
|
|
269 | (26) |
|
|
|
272 | (2) |
|
|
|
274 | (18) |
|
Assemble the Prototyping Shield |
|
|
275 | (1) |
|
|
|
275 | (2) |
|
|
|
277 | (1) |
|
|
|
278 | (2) |
|
|
|
280 | (2) |
|
|
|
282 | (1) |
|
Assemble the ID-12 Reader Module |
|
|
282 | (2) |
|
Assemble the RDM630 Reader |
|
|
284 | (1) |
|
Simple Stand-Alone Sketch |
|
|
285 | (6) |
|
|
|
291 | (1) |
|
|
|
291 | (1) |
|
|
|
292 | (1) |
|
|
|
292 | (2) |
|
|
|
292 | (1) |
|
Speech Synthesizer Feedback |
|
|
293 | (1) |
|
|
|
294 | (1) |
|
|
|
294 | (1) |
|
Vehicle Telemetry Platform |
|
|
295 | (88) |
|
|
|
298 | (3) |
|
|
|
301 | (79) |
|
Check the Vehicle Interface |
|
|
301 | (1) |
|
Obtain a USB/OBD-II or RS-232 Adapter |
|
|
302 | (1) |
|
Test the USB/OBD-II Adapter |
|
|
303 | (1) |
|
Understanding OBD-II Modes and Parameters |
|
|
304 | (4) |
|
Prepare the USB/OBD-II Adapter |
|
|
308 | (5) |
|
Assemble the OBD-II Cable |
|
|
313 | (1) |
|
|
|
314 | (5) |
|
Assemble the Power Supply on the Shield |
|
|
319 | (4) |
|
Fit the Serial Connections on the Shield |
|
|
323 | (1) |
|
|
|
324 | (4) |
|
|
|
328 | (3) |
|
Logging Control Button and Status LEDs |
|
|
331 | (1) |
|
Mount in Sub-Assemblies in the Case |
|
|
332 | (6) |
|
|
|
338 | (1) |
|
|
|
339 | (27) |
|
|
|
366 | (4) |
|
|
|
370 | (1) |
|
|
|
371 | (1) |
|
|
|
372 | (3) |
|
|
|
375 | (1) |
|
Using the OBDuinoMega Sketch |
|
|
376 | (1) |
|
|
|
376 | (2) |
|
|
|
378 | (2) |
|
Generate Google Earth Track |
|
|
380 | (1) |
|
Generate Charts of Parameters |
|
|
380 | (1) |
|
|
|
380 | (2) |
|
Mobile Internet Connection |
|
|
381 | (1) |
|
|
|
381 | (1) |
|
Speech Synthesizer Output |
|
|
381 | (1) |
|
|
|
381 | (1) |
|
|
|
381 | (1) |
|
``Knight Rider''--Style Alarm Status |
|
|
381 | (1) |
|
|
|
382 | (1) |
|
|
|
382 | (1) |
|
|
|
383 | (22) |
|
Simple Voltage Regulators |
|
|
383 | (1) |
|
|
|
384 | (1) |
|
|
|
384 | (1) |
|
|
|
384 | (1) |
|
|
|
384 | (4) |
|
|
|
385 | (2) |
|
|
|
387 | (1) |
|
Output Circuitry and Isolation |
|
|
388 | (5) |
|
Semiconductor and Mechanical Switches |
|
|
389 | (1) |
|
|
|
389 | (1) |
|
|
|
390 | (1) |
|
|
|
391 | (1) |
|
|
|
392 | (1) |
|
|
|
392 | (1) |
|
|
|
393 | (1) |
|
|
|
393 | (1) |
|
Digital Input/Output Expansion |
|
|
393 | (3) |
|
Shift Registers As Outputs |
|
|
393 | (2) |
|
Shift Registers As Inputs |
|
|
395 | (1) |
|
|
|
396 | (3) |
|
Voltage Dividers and Nonisolated Input Conditioning |
|
|
396 | (2) |
|
Isolated Input Conditioning |
|
|
398 | (1) |
|
Inexpensive DIY Prototyping Shields |
|
|
399 | (2) |
|
Writing an Arduino Library |
|
|
401 | (4) |
|
Develop Functionality As a Sketch |
|
|
402 | (1) |
|
Create the Library Header File |
|
|
403 | (2) |
|
Create the Library Class File |
|
|
405 | (2) |
|
Create the Example Sketch |
|
|
407 | (1) |
|
|
|
408 | (1) |
|
Platform-Specific Variations |
|
|
409 | (1) |
|
|
|
409 | |
| Index |
|
405 | |