Overview

Skill Level: Any Skill Level

IntroductionEnergia is a Rapid Prototyping Environment based on the Wiring/Arduino Frameworks modified to support Texas Instruments Embedded Processors. PrepareDownload and install the latest version of Energia Platform http://energia.nu/download/ which is available for Windows, Mac and LinuxOpen the Energia IDE and select theLaunchPad (Tiva C) w/ tm4c129 (120MHz) under the Tools/Board menuAppropriate port under Tools/Serial Port […]

Ingredients

Hardware Requirements

Step-by-step

  1. Introduction

    Energia is a Rapid Prototyping Environment based on the Wiring/Arduino Frameworks modified to support Texas Instruments Embedded Processors.

  2. Prepare

    1. Download and install the latest version of Energia Platform http://energia.nu/download/ which is available for Windows, Mac and Linux

    2. Open the Energia IDE and select the

      • LaunchPad (Tiva C) w/ tm4c129 (120MHz) under the Tools/Board menu
      • Appropriate port under Tools/Serial Port menu.

    3. The Paho MQTT Embedded C/C++ Client https://eclipse.org/paho/clients/c/embedded/ has been pre-integrated into the Energia examples, making it extremely easy to connect to the IIBM Watson IoT Platform Services.
  3. Connect (Quickstart)

    IBM Watson IoT Platform Quickstart connection

    1. Open File/Examples/MQTTClient/QuickstartEthernet

    2. Verify/Compile the example

    3. Choose Upload and then Open Serial Monitor.

    4. The application will connect to the IBM quickstart service and start sending data periodically.
  4. Visualize

    1. Click on the link shown on the UART console to redirect to the IBM Watson IoT Platform Visualiser
    2. To view the data, simply visit Quickstart and type in the MAC address of your LaunchPad.
  5. Register your Device In Watson IoT Platform

    To explore and make use of full capabilities of Watson IoT Platform, we need to setup and register your device(s) in it. This section shows how you can setup the same.

    Carry out the steps present in this recipe to register your device(s) in IBM Watson Internet of Things Platform.

    At this step, we have successfully created the Watson IoT service and registered your device(s) in it.

  6. Connect (Registered)

    IBM Watson IoT Platform Registered connection

    1. Once you have access to an IBM Watson IoT Platform organization through Bluemix or the Marketplace, you can click to ‘Add a new device’ on the IoT organization dashboard.

    2. During the device registration process you will get device properties, copy these when you get them. They will look like this:

      org=xyzzyztype=iotsample-ti-energiaid=01c7ca014599auth-method=tokenauth-token=ijeifwiefiweff@
    3. Open File/Examples/MQTTClient/RegisteredEthernet

    4. Update the example source code to add the registered organisation and auth-token.

    5. Verify/Compile the example

    6. Choose Upload and then Open Serial Monitor.

    7. The application will connect to the IBM registered service and start sending data periodically.

Expected Outcome

In a few minutes this tutorial will help you connect your device to Quicktart in IBM's Internet of Things (IoT) Foundation and show you real-time data from your device. It'll then let you register your device ready to write your first application.

Join The Discussion