Networking is one of those techniques that may have a direct impact on the
outside world. In the next chapter, you’ll learn about another technique that
has similar effects: you’ll learn how to control devices remotely.
What If It Doesn’t Work?
The burglar alarm is a networking project, so you should check all the things
mentioned in What If It Doesn’t Work?, on page 180. In addition, you should
double-check the connection parameters and authentication information for
your email provider. Did you use the correct IP address for your email
provider? Did you use the right SMTP port? Did you use the right username
and password? Did you use the right Base64 version of the username and
password?
PIR sensors are fairly simple devices. Still, you can wire them the wrong way,
so if the motion detection doesn’t work, double-check the wiring.
Exercises
• Build a project similar to the burglar alarm, but use another type of sen-
sor. There’s tons of inspiration out there on the Web.
9
• Add the current timestamp to the burglar alarm email. Get the timestamp
from a Daytime service.
• Add support for DHCP and DNS to the burglar alarm.
• Add support for Base64 to the burglar alarm, so you no longer have to
manually encode your username and password. A Base64 library is
available.
10
• Add a piezo buzzer to the project and emit a beeping sound whenever a
burglar is detected.
• Get a TTL Serial Camera
11
and attach photos of the burglar to your emails.
This is a fairly advanced exercise. You have to learn how to control the
camera, and you also have to learn how to send email attachments.
9.
http://www.tigoe.net/pcomp/code/arduinowiring/873
10.
https://github.com/adamvr/arduino-base64
11.
https://learn.adafruit.com/ttl-serial-camera/overview
Chapter 11. Creating a Burglar Alarm with Email Notification • 200
report erratum • discuss
www.it-ebooks.info