Where to place TembooAccount.h?
I get the following error for the code below. Code works in Temboo Library.
Arduino: 1.5.4 (Windows 7), Board: “Arduino Yún”
TembooMail.ino:3:86: error: TembooAccount.h: No such file or directory
TembooMail.ino: In function ‘void loop()’:
TembooMail:27: error: ‘TEMBOO_ACCOUNT’ was not declared in this scope
TembooMail:28: error: ‘TEMBOO_APP_KEY_NAME’ was not declared in this scope
TembooMail:29: error: ‘TEMBOO_APP_KEY’ was not declared in this scope
I think I have the wrong place for the h-file.
#include <Bridge.h>
#include <Temboo.h>
#include "TembooAccount.h" // contains Temboo account information, as described below
int numRuns = 1; // execution count, so this doesn't run forever
int maxRuns = 10; // maximum number of times the Choreo should be executed
void setup() {
Serial.begin(9600);
// For debugging, wait until a serial console is connected.
delay(4000);
while(!Serial);
Bridge.begin();
}
void loop()
{
if (numRuns <= maxRuns) {
Serial.println("Running SendEmail - Run #" + String(numRuns++));
TembooChoreo SendEmailChoreo;
// invoke the Temboo client
SendEmailChoreo.begin();
// set Temboo account credentials
SendEmailChoreo.setAccountName(TEMBOO_ACCOUNT);
SendEmailChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME);
SendEmailChoreo.setAppKey(TEMBOO_APP_KEY);
// set choreo inputs
SendEmailChoreo.addInput("MessageBody", "Das ist eine eMail ?ber Temboo und GMail versendet");
SendEmailChoreo.addInput("Subject", "TembooMail");
SendEmailChoreo.addInput("Password", "xxxx");
SendEmailChoreo.addInput("Username", "xxxx@gmail.com");
SendEmailChoreo.addInput("FromAddress", "xxxxx");
SendEmailChoreo.addInput("ToAddress", "xxxxh");
// identify choreo to run
SendEmailChoreo.setChoreo("/Library/Google/Gmail/SendEmail");
// run choreo; when results are available, print them to serial
SendEmailChoreo.run();
while(SendEmailChoreo.available()) {
char c = SendEmailChoreo.read();
Serial.print(c);
}
SendEmailChoreo.close();
}
Serial.println("Waiting...");
delay(30000); // wait 30 seconds between SendEmail calls
}