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 #206 background imageLoading...
Page #206 background image
Ethernet/Email/smtp_service.h
#ifndef __SMTP_SERVICE__H_
Line 1
#define __SMTP_SERVICE__H_
-
-
#include "email.h"
-
5
class SmtpService {
-
boolean _use_auth;
-
IPAddress _smtp_server;
-
unsigned int _port;
-
String _username;
10
String _password;
-
-
void read_response(EthernetClient& client) {
-
delay(4000);
-
while (client.available()) {
15
const char c = client.read();
-
Serial.print(c);
-
}
-
}
-
20
void send_line(EthernetClient& client, String line) {
-
const unsigned int MAX_LINE = 256;
-
char buffer[MAX_LINE];
-
line.toCharArray(buffer, MAX_LINE);
-
Serial.println(buffer);
25
client.println(buffer);
-
read_response(client);
-
}
-
-
public:
30
-
SmtpService(
-
const IPAddress& smtp_server,
-
const unsigned int port) : _use_auth(false),
-
_smtp_server(smtp_server),
35
_port(port) { }
-
-
SmtpService(
-
const IPAddress& smtp_server,
-
const unsigned int port,
40
const String& username,
-
const String& password) : _use_auth(true),
-
_smtp_server(smtp_server),
-
_port(port),
-
_username(username),
45
_password(password) { }
-
-
void send_email(const Email& email) {
-
EthernetClient client;
-
Chapter 11. Creating a Burglar Alarm with Email Notification 190
report erratum discuss
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