11. Creating a Burglar Alarm with Email Notification . . . 183
What You Need 184
Emailing from the Command Line 184
Emailing Directly from an Arduino 189
Detecting Motion Using a Passive Infrared Sensor 193
Bringing It All Together 197
What If It Doesn’t Work? 200
Exercises 200
12. Creating Your Own Universal Remote Control . . . . 201
What You Need 202
Understanding Infrared Remote Controls 202
Grabbing Remote Control Codes 203
Cloning a Remote 207
Controlling Infrared Devices Remotely with Your Browser 212
Building an Infrared Proxy 216
What If It Doesn’t Work? 223
Exercises 223
13. Controlling Motors with Arduino . . . . . . . 225
What You Need 225
Introducing Motors 226
First Steps with a Servo Motor 227
Building a Blaminatr 230
What If It Doesn’t Work? 235
Exercises 235
Part III — Appendixes
A1. Electronics and Soldering Basics . . . . . . . 239
Current, Voltage, and Resistance 239
Electrical Circuits 239
Learning How to Use a Wire Cutter 243
Learning How to Solder 243
Learning How to Desolder 247
A2. Advanced Arduino Programming . . . . . . . 249
The Arduino Programming Language 249
Bit Operations 251
Contents • viii
www.it-ebooks.info