Hello,
I was lucky enough to buy an Arduino Yun from adafruit.com on Thursday. I just received the board today(Tuesday), so I don't know too much about it, but I have been reading the getting started pages on Arduino's web site before I received the board. I created a Temboo account and I have my TembooAccount.h file created in the same folder as my sketch (this is the example Temboo give for getting weather from Yahoo!). I hope that is the correct location for the TembooAccount.h file. Does any one know if it is?
I can upload the sketch fine via WiFi, because I tested other simple sketches like blink and they work fine. I try the get weather from Yahoo through Temboo and Temboo does not show in the log file that my YUN is connecting to their site. I get the following in the serial monitor:
Unable to connect: retrying (1)...
Unable to connect: retrying (2)...
Unable to connect: retrying (3)...
Unable to connect: retrying (4)...
Unable to connect: is the sketch using the bridge?
I'm assuming that I'm no connecting to the web site, because I cannot connect to the bridge. On Temboo's web site, I sued the "try it" function and the response was the weather for my city and the Temboo logs showed the two times I tried.
Any ideas?
Here's the code too. I replaced my location from my zip code with "$$$$$"
#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 GetWeatherByAddress - Run #" + String(numRuns++));
TembooChoreo GetWeatherByAddressChoreo;
// invoke the Temboo client
GetWeatherByAddressChoreo.begin();
// set Temboo account credentials
GetWeatherByAddressChoreo.setAccountName(TEMBOO_ACCOUNT);
GetWeatherByAddressChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME);
GetWeatherByAddressChoreo.setAppKey(TEMBOO_APP_KEY);
// set choreo inputs
GetWeatherByAddressChoreo.addInput("Address", "$$$$$");
// identify choreo to run
GetWeatherByAddressChoreo.setChoreo("/Library/Yahoo/Weather/GetWeatherByAddress");
// run choreo; when results are available, print them to serial
GetWeatherByAddressChoreo.run();
while(GetWeatherByAddressChoreo.available()) {
char c = GetWeatherByAddressChoreo.read();
Serial.print(c);
}
GetWeatherByAddressChoreo.close();
}
Serial.println("Waiting...");
delay(30000); // wait 30 seconds between GetWeatherByAddress calls
}