Launch Your IoT Design

Connect to 100+ cloud services & websites with Temboo

Background:

Temboo is an IoT partner that can generate code for our TI LaunchPad™ development kits to interface with 100s of REST-ful services. Want your LaunchPad kit to call your phone when a sensor trips a threshold, or blink an LED when your tracking number shows a package has been delivered, Temboo can help get you there!

Hardware:

Any LaunchPad kit (+BoosterPack plug-in module) that is capable of connecting to the internet via Wi-Fi or Ethernet.

For this tutorial, we’re using the MSP432 LaunchPad kit & CC3100 WiFi BoosterPack module.

Software:

We will be using Energia for this tutorial. Energia offers an easy-to-use Wi-Fi library for many TI LaunchPad development kits. Temboo can generate the appropriate code that leverages Energia’s HTTP client library. You don’t have to toil away learning REST-ful APIs for 100s of sites, Temboo can do it for you. You can download Energia @ www.energia.nu.

STEP 1) Create Temboo Account

  • Create an account on temboo.com.

STEP 2) Select TI as your desired platform:

  • Select Texas Instruments as your desired platform.

STEP 3) Let’s generate code that checks the weather using Yahoo’s REST-ful weather API

  • In the field, type in the desired address you want to check the weather for.
  • Click on the “Generate Code” button.

STEP 4) Look at the Energia-based generated code!

  • You can test out the REST API your LaunchPad will leverage by clicking on the “Run the Code” button.
  • Temboo will show you the response that your LaunchPad will receive from Yahoo.

STEP 5) Explore more “choreos”

  • Click the “Try out more Choreos” button to see the full list of websites & services Temboo has support for.
  • This will take you to your Temboo account dashboard.
  • On the left is the long list of sites & services that Temboo can generate code for.

STEP 6) Let’s continue with the “get temperature” example

  • Scroll down the list & click on:
    • “Yahoo” > “Weather” > “GetTemperature”
  • This will take us to a “wizard” where we can provide inputs to Temboo so it can generate the appropriate code.

STEP 7) We need to tell Temboo which hardware we are using

  • Click the “How is it connected” dropdown & select your HW configuration.
    • Are you using the CC3200 WiFi LaunchPad?
    • Or are you using TI LaunchPad + CC3100 WiFi BoosterPack?
    • Or are you using the TM4C Ethernet-connected LaunchPad?
  • Once you make a selection, a popup will appear asking you to save your HW configuration profile.
    • Give it a name & provide your WiFi network’s credentials.
    • Click Save.

STEP 8) Provide Inputs to Temboo

  • The only required input for this choreo is the address/location of the area you want to check the weather for.
  • Type it into the text field.
  • If you want to test your inputs, you can click on the pink “Run” button. This will test the RESTful API using the inputs provided & will show Yahoo’s response.

STEP 9) Generated code!

  • Further down the page are 2 code blocks.
    • Code: This is a complete application example. This is a full Energia “sketch” that can be copied & pasted into your Energia IDE un-modified. This code will simply query yahoo.com every 30 seconds for a new weather update.
    • Header File: This file (TembooAccount.h) includes your Temboo credentials & Wi-Fi login information.
    • Both files need to be copied & pasted into Energia.

STEP 10) Copy, paste, compile & flash!

  • That’s it! Copy & paste the code into Energia, compile & flash it into your LaunchPad!
  • Open up a serial monitor/terminal to see the weather data response your LaunchPad receives from the cloud!

A few more things….

  • You can also configure Temboo to only trigger a “choreo” based on an I/O event (i.e. only check the weather when digital pin 7 is High.)
  • Temboo can also pre-filter responses from the server to minimize processing required on the microcontroller.
  • Other fun services to try:
    • Send an email using Gmail when a sensor exceeds a threshold.
    • Buzz a buzzer when a package arrives from Fedex.com.
    • Get answers to tough math questions using wolframalpha.