The error I receive is:
"Arduino: 1.8.2 (Windows Store 1.8.3.0) (Windows 10), Board: "Arduino Yún Mini"
exit status 1
no matching function for call to 'TembooChoreo::TembooChoreo()"
I imagine this has to do with Temboo supporting the Yun, but not the Yun mini explicitly. Do any of you know any workarounds, besides having to go hunt down a regular Arduino Yun?
Here is the associated code output by the Temboo page for the tutorial I was using (available here: Arduino Yún: Log data to Google Spreadsheets from your Arduino Yún), if that helps.
#include <Bridge.h>
#include <Temboo.h>
#include "TembooAccount.h" // contains Temboo account information
/*** SUBSTITUTE YOUR VALUES BELOW: ***/
// Note that for additional security and reusability, you could
// use #define statements to specify these values in a .h file.
const String GOOGLE_CLIENT_ID = REMOVED;
const String GOOGLE_CLIENT_SECRET =REMOVED;
const String GOOGLE_REFRESH_TOKEN = REMOVED;
// The ID of the spreadsheet you want to send data to
// which can be found in the URL when viewing your spreadsheet at Google. For example,
// the ID in the URL below is: "1tvFW2n-xFFJCE1q5j0HTetOsDhhgw7_998_K4sFtk"
// Sample URL: https://docs.google.com/spreadsheets/d/1tvFW2n-xFFJCE1q5j0HTetOsDhhgw7_998_K4sFtk/edit
const String SPREADSHEET_ID = "1bA3qIdShN8wxDkuCCIY9887VxjeEo9XcpgqMHLOxBFk";
int numRuns = 1; // execution count, so this doesn't run forever
int maxRuns = 100; // the max number of times the Google Spreadsheet Choreo should run
void setup() {
// for debugging, wait until a serial console is connected
Serial.begin(9600);
delay(4000);
while(!Serial);
Serial.print("Initializing the bridge... ");
Bridge.begin();
Serial.println("Done!\n");
}
void loop()
{
// while we haven't reached the max number of runs...
if (numRuns <= maxRuns) {
Serial.println("Running AppendValues - Run #" + String(numRuns++));
// get the number of milliseconds this sketch has been running
unsigned long now = millis();
Serial.println("Getting sensor value...");
// get the value we want to append to our spreadsheet
unsigned long sensorValue = getSensorValue();
Serial.println("Appending value to spreadsheet...");
// we need a Process object to send a Choreo request to Temboo
TembooChoreo AppendValuesChoreo;
// invoke the Temboo client
// NOTE that the client must be reinvoked and repopulated with
// appropriate arguments each time its run() method is called.
AppendValuesChoreo.begin();
// set Temboo account credentials
AppendValuesChoreo.setAccountName(TEMBOO_ACCOUNT);
AppendValuesChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME);
AppendValuesChoreo.setAppKey(TEMBOO_APP_KEY);
// identify the Temboo Library choreo to run (Google > Sheets > AppendValues)
AppendValuesChoreo.setChoreo("/Library/Google/Sheets/AppendValues");
// set the required Choreo inputs
// see Library - Google - Sheets - AppendValues API :: Temboo
// for complete details about the inputs for this Choreo
// your Google Client ID
AppendValuesChoreo.addInput("ClientID", GOOGLE_CLIENT_ID);
// your Google Client Secret
AppendValuesChoreo.addInput("ClientSecret", GOOGLE_CLIENT_SECRET);
// your Google Refresh Token
AppendValuesChoreo.addInput("RefreshToken", GOOGLE_REFRESH_TOKEN);
// the title of the spreadsheet you want to append to
AppendValuesChoreo.addInput("SpreadsheetID", SPREADSHEET_ID);
// convert the time and sensor values to a json array
String rowData = "[["" + String(now) + "", "" + String(sensorValue) + ""]]";
// add the RowData input item
AppendValuesChoreo.addInput("Values", rowData);
// run the Choreo and wait for the results
// The return code (returnCode) will indicate success or failure
unsigned int returnCode = AppendValuesChoreo.run();
// return code of zero (0) means success
if (returnCode == 0) {
Serial.println("Success! Appended " + rowData);
Serial.println("");
} else {
// return code of anything other than zero means failure
// read and display any error messages
while (AppendValuesChoreo.available()) {
char c = AppendValuesChoreo.read();
Serial.print(c);
}
}
AppendValuesChoreo.close();
}
Serial.println("Waiting...");
delay(5000); // wait 5 seconds between AppendValues calls
}
// this function simulates reading the value of a sensor
unsigned long getSensorValue() {
return analogRead(A0);
}