Get Set Up
1First, make sure you have a Temboo account. If you don't have one yet, you can create one for free now.
2The Temboo library for Arduino comes bundled with the Arduino IDE, so make sure that you've got the latest version of the Arduino IDE installed. Be sure to check that you have the most up-to-date version of the Temboo Library, using the Arduino Library Manager.
Find What You Need
3 Go to our Library and find the Yahoo > Weather > GetWeatherByAddress Choreo.
The Yahoo GetWeatherByAddress Choreo in our Library
4Select Arduino from the drop down menu and provide details about how your device will connect to the Internet.
Selecting your Arduino's configuration
5Enter any complete address in the Address input field e.g., 104 Franklin Street, NYC.
6Now click Generate Code to test the Choreo from our site. After a moment you'll see the data that Yahoo Weather sends back shown in the Output section.
The output from the Yahoo Weather API (which is in XML format)
7If you'd like the Choreo to be triggered by a sensor event, or if you'd like the Choreo result to trigger an actuator event, you can specify conditions above and below the Choreo inputs and we'll generate the application logic code you need. Use the visual pin board to set up a sensor or actuator and the conditions option will appear. You can learn more about conditions here.
Make Your Arduino Sketch
When you have selected your Arduino configuration and you run a Choreo, Temboo automatically generates code that can be used to make the same API call from an Arduino sketch.
8Scroll down to the Code section of the Library page.
9Copy the code, and paste it into a new sketch in the Arduino editor.
Remember to Create Your Header File
In order to run this sketch on your Arduino, it needs to be configured with an appropriate TembooAccount.h
header file that contains your Temboo account information and internet shield setup information.
To create the header file:
10Make a new tab in the Arduino editor, and name it TembooAccount.h
11Beneath the sketch code you previously copied from the Library, you’ll find a header file containing #define
statements and details about your Arduino's Internet configuration. Copy the contents of the header into your TembooAccount.h
file.
The TembooAccount.h header file
Run the Sketch and rejoice
Save and upload your sketch to the Arduino, and open the serial monitor. After running the sketch, you'll see the response from the Yahoo Weather service printed to the monitor.
Congratulations! This same approach will work with your Arduino for all of our 2000+ Choreos in our Library. Because these ready-to-run tasks take care of so many steps, we named them after choreographies. Now that you know how to make your Arduino run any Choreo, you're just a few steps away from making something extraordinary. With Temboo handling all the small stuff, you're free to think big!
What's Next?
Now that you've got something simple up and running, why not move on try making your board do something more advanced?
Need help?
We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.