Hardware

How to Temboo with your TI LaunchPad


Temboo makes it easy for Texas Instruments microcontrollers to connect to any web-based resource. To get you started, we'll show how to query the Yahoo Weather API from your LaunchPad.

The key things you'll learn are:

  • How to get set up to use Temboo with your Texas Instruments LaunchPad
  • How to use Temboo's auto-generated code
  • How to move on and connect your LaunchPad to any web-based resource

Now, Let's Jump In!

Before you start, you’ll need to download and install the latest version of the Energia IDE.

Get Set Up

1Start by logging in to Temboo. If you don't have an account you can create one for free here.

2Go to the Yahoo > Weather > GetWeatherByAddress Choreo in our Library.

Yahoo! Weather Inputs

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 Generate Code to test the Choreo from our website. 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).

Yahoo! Weather Outputs

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.

5Select "Texas Instruments" from the drop down menu, then choose your board. Make sure that you've added details about how your LaunchPad is connected to the internet.

Selecting the Texas Instruments LaunchPad

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 visual pin board to set up a sensor or actuator and the conditions option will appear. You can learn more about conditions here.

Input Condition

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 TembooAccount.h.

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 TembooAccount.h file.

Header File

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.

Energia Menu

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.

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.


Back