diff options
author | Federico Fissore <f.fissore@arduino.cc> | 2013-07-15 15:22:50 +0200 |
---|---|---|
committer | Federico Fissore <f.fissore@arduino.cc> | 2013-07-15 15:22:50 +0200 |
commit | beb9e08b79d5c59957c1532e50da30cccc318cac (patch) | |
tree | 7bcc2a5440c4ce7b7017174b27bb95f1e174de83 /libraries/Bridge/examples/Temboo/SendAnEmail | |
parent | 5836db3ddb6fa757169aede51395b7e39669ff4c (diff) |
updated temboo examples (added ControlBySMS)
Diffstat (limited to 'libraries/Bridge/examples/Temboo/SendAnEmail')
-rw-r--r-- | libraries/Bridge/examples/Temboo/SendAnEmail/SendAnEmail.ino | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libraries/Bridge/examples/Temboo/SendAnEmail/SendAnEmail.ino b/libraries/Bridge/examples/Temboo/SendAnEmail/SendAnEmail.ino index a1cabce..4f841f8 100644 --- a/libraries/Bridge/examples/Temboo/SendAnEmail/SendAnEmail.ino +++ b/libraries/Bridge/examples/Temboo/SendAnEmail/SendAnEmail.ino @@ -40,8 +40,8 @@ const String GMAIL_PASSWORD = "xxxxxxxxxx"; // the email address you want to send the email to, eg "jane.doe@temboo.com" const String TO_EMAIL_ADDRESS = "xxxxxxxxxx"; - -boolean success = false; // a flag to indicate whether we've sent the email yet or not +// a flag to indicate whether we've tried to send the email yet or not +boolean attempted = false; void setup() { Serial.begin(9600); @@ -55,8 +55,8 @@ void setup() { void loop() { - // only try to send the email if we haven't already sent it successfully - if (!success) { + // only try to send the email if we haven't already tried + if (!attempted) { Serial.println("Running SendAnEmail..."); @@ -100,7 +100,6 @@ void loop() // a return code of zero (0) means everything worked if (returnCode == 0) { Serial.println("Success! Email sent!"); - success = true; } else { // a non-zero return code means there was an error // read and print the error message @@ -110,9 +109,9 @@ void loop() } } SendEmailChoreo.close(); - - // do nothing for the next 60 seconds - delay(60000); + + // set the flag showing we've tried + attempted = true; } } |