EasyManuals Logo

Arduino uno User Manual

Arduino uno
311 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #209 background imageLoading...
Page #209 background image
-
// Insert IP address of your SMTP server below!
-
IPAddress smtp_server(0, 0, 0, 0);
-
15
SmtpService smtp_service(smtp_server, SMTP_PORT, USERNAME, PASSWORD);
-
-
void setup() {
-
Ethernet.begin(mac, my_ip);
-
Serial.begin(BAUD_RATE);
20
delay(1000);
-
Email email(
-
"arduino@example.com",
-
"info@example.net",
-
"Yet another subject",
25
"Yet another body"
-
);
-
smtp_service.send_email(email);
-
}
-
30
void loop() {}
-
No surprises here. We define constants for the SMTP port, the MAC address,
the username, the password, and so on; then we create an
SmtpService
instance.
In the
setup
function, we initialize the Ethernet shield and the serial port, then
wait for a second to let things settle down. In line 22, we create a new
Email
object and pass it to the
send_email
method.
Figure 28, A typical SMTP session on the Arduino, on page 194 shows this in
action (including authentication).
Now we know how to send emails with an Arduino, but to build our burglar
alarm, we still have to learn how to detect motion.
Detecting Motion Using a Passive Infrared Sensor
Detecting motion is a useful technique, and you probably already know devices
that turn on the light in your garden or at your door whenever someone is
near enough. Most use passive infrared sensors (PIR)
5
for motion detection.
Nearly every object emits infrared light and a PIR sensor measures exactly
this kind of light. Detecting motion is comparatively easy if youre already
able to receive the infrared radiation emitted by objects in the sensors field
of view. If the sensor receives the infrared light emitted by a wall and suddenly
a human being or an animal moves in front of the wall, the infrared light
signal will change.
5.
http://en.wikipedia.org/wiki/Passive_infrared_sensor
report erratum discuss
Detecting Motion Using a Passive Infrared Sensor 193
www.it-ebooks.info

Table of Contents

Other manuals for Arduino uno

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino uno and is the answer not in the manual?

Arduino uno Specifications

General IconGeneral
Form factorArduino
CertificationRoHS, FC, CE
Processor model-
Processor frequency- MHz
Microcontroller modelATmega328
Microcontroller frequency16 MHz
DC input voltage7-12 V
Operating voltage5 V
DC current per I/O pin40 mA
Flash memory0.032 MB
Maximum internal memory- GB
SRAM (Static Random Access Memory)2 KB
EEPROM (Electrically Erasable Programmable Read-Only Memory)1 KB
Wi-FiNo
Number of analog I/O pins6
Number of digital I/O pins14
Weight and Dimensions IconWeight and Dimensions
Board dimensions53.4 x 68.6 mm

Related product manuals