Arduino Email Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld
Arduino Email Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld

Send and attach file to emails when any certain hardware event happens on Arduino.

This shield is one of the communication shields.Communication shields allow you to use your smartphone as a gateway between Arduino and other phones, they make it easier to communicate with your Arduino board by sending and receiving data to or from another phone. Learn more from the communication shields tutorial.

Email Library allows Arduino board to send emails through 1Sheeld application, so now it’s easy to send data over the internet using email library.

Adding #define CUSTOM_SETTINGS along with #define INCLUDE_EMAIL_SHIELD is a key that will let you unlock the Email shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.

Note

For Android M(6) or greater, there are permissions to be granted before using the Data Logger shield, please make sure to grant the permissions or else it may affect the application’s performance.

 

void send(const char *,const char *,const char *)

Sends email with data of recipient email, subject and the body.

 

SYNTAX
Email.send(recipientEmail,subject,body);

 

RETURNS
None.

 

PARAMETERS
1st Parameter takes char array holding the recipient email address.
2nd Parameter takes char array holding email’s subject.
3rd Parameter takes char array holding email’s body.

 

USAGE
Email.send(“[email protected]”,“SubjectIncludedHere“,”bodyOfEmail”);

 

void send(String,String,String)

Sends email with data of recipient email, subject and the body.

 

SYNTAX
Email.send(recipientEmail,subject,body);

 

RETURNS
None.

 

PARAMETERS
1st Parameter takes string object holding the recipient email address.
2nd Parameter takes string object holding email’s subject.
3rd Parameter takes string object holding email’s body.

 

USAGE
String email = “[email protected]”;
String subject = “subjectDataHere”;
String body = “bodyDataHere”;
Email.send (email,subject,body);

 

void attachLastPicture(const char *,const char *,const char *,byte)

Attaches last picture taken by the smartphone’s camera in email and sends it.

 

SYNTAX
Email.attachLastPicture(recipientEmail,subject,body,folderDirectory);
Note: Folder directory supports to choose whether attaching pictures from OneSheeld folder “which created by the application once you use Camera shield” by passing “0” to the function or Camera folder by passing “1” to the function.(0 by default)

 

RETURNS
None.

 

PARAMETERS
1st Parameter takes const char array holding recipient’s email address.
2nd Parameter takes const char array holding email’s subject.
3rd Parameter takes const char array holding email’s body.
4th Parameter takes a byte holding the number to upload picture from OneSheeld folder “0” or Camera folder”1″.

 

USAGE
Email.attachLastPicture(“[email protected]”,“SubjectIncludedHere“,”bodyOfEmail”, 0/1);

 

void attachLastPicture(String,String,String,byte)

Attaches last picture taken by the smartphone’s camera in email and sends it.

 

SYNTAX
Email.attachLastPicture(recipientEmail,subject,body,folderDirectory);
Note: Folder directory supports to choose whether attaching pictures from OneSheeld folder “which created by the application once you use Camera shield” by passing “0” to the function or Camera folder by passing “1” to the function.(0 by default)

 

RETURNS
None.

 

PARAMETERS
1st Parameter takes string object holding recipient’s email address.
2nd Parameter takes string object holding email’s subject.
3rd Parameter takes string object holding email’s body.
4th Parameter takes a byte holding the number to upload picture from OneSheeld folder “0” or Camera folder”1″.

 

USAGE
String email = “[email protected]”;
String subject = “subjectDataHere”;
String body = “bodyDataHere”;
Email.attachLastPicture(email,subject,body,0/1);

 

void attachFile(int)

Attaches certain file (or multiple files) like videos,mic records and (.csv) files to your email.It just prepares your attachments in the email but still needs Email.send(,,,) method to append the recipient,subject and body and send the email.(feature currently supported by IOS app and soon for Android)

 

Literals:
LAST_CAMERA_PIC_ONESHEELD_FOLDER
LAST_CAMERA_PIC_CAMERA_FOLDER
LAST_CAMERA_VIDEO
LAST_CHART_CSV
LAST_DATA_LOGGER_CSV
LAST_MIC_RECORD

 

SYNTAX
Email.attachFile(LAST_DATA_LOGGER_CSV);

 

RETURNS
None.

 

PARAMETERS
Takes an int (Literal) holding file type to be attached.

 

USAGE
String email = “[email protected]”;
String subject = “subjectDataHere”;
String body = “bodyDataHere”;
Email.attachFile(LAST_CAMERA_VIDEO);
Email.attachFile(LAST_MIC_RECORD);
Email.attachFile(LAST_CAMERA_PIC_ONESHEELD_FOLDER);
Email.send(email,subject,body);