Before you start, you’ll need to download and install the latest version of the Energia IDE.
Get Set Up
2Go to the Yahoo > Weather > GetWeatherByAddress Choreo in our Library.
The Yahoo! GetWeatherByAddress Choreo in our Library
3Enter any address in the Address input field e.g., 104 Franklin St New York, NY 10013.
4Now click Run. After a moment you'll see the data that Yahoo! Weather sends back shown in the OUTPUT section of the page (which is right below the Input section).
The output from the Yahoo! Weather API (which is in XML format)
Auto-Generate your LaunchPad Sketch
When you run a Choreo from the website, Temboo automatically generates code that can be used to make the same API call from a LaunchPad sketch.
5Turn IoT Mode ON, select your board from the drop down menu and make sure that you've added details about how your LaunchPad is connected to the internet.
The IoT Mode switch can be found on each Choreo page in the Temboo Library
6If 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 virtual board to set up a sensor or actuator and the conditions option will appear. You can learn more about conditions here.
7Scroll down to the CODE section of the Library page. Then Copy the code, and paste it into a new sketch in Energia.
Remember to Create Your Header File
In order to run this sketch on your LaunchPad, it needs to be configured with an appropriate
TembooAccount.h header file that contains your Temboo account information.
To create the header file:
8Make a new tab in Energia, and name it
9Beneath the sketch code you previously copied from the Library, you’ll find a header file containing
#define statements. Copy the contents of the header into your
The TembooAccount.h header file
Run the Sketch and rejoice
10The final step before running any sketch is to confirm that you've selected the appropriate board and serial port in Energia. Go to the Tools > Board menu and select the LaunchPad you're working with. Then go to Tools > Serial Port and select the port your board is connected to.
Select your board and port from the Energia Tools menu
11With both files in place you are ready to upload the sketch to the LaunchPad. After running the sketch, open the Serial Monitor and you'll see the response from Yahoo! Weather.
Congratulations! This same approach will work with your LaunchPad for all of our 2000+ Choreos. 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 LaunchPad 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.
Now that you've got something simple up and running, why not move on try making your board do something more advanced?
We're always happy to help. Just email us at email@example.com, and we'll answer your questions.