This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Connected Launchpad with Sensor Hub BoosterPack

Other Parts Discussed in Thread: EK-TM4C1294XL, TMP006

I have the EK-TM4C1294XL Connected Launchpad working with the BOOSTXL-SENSHUB Sensor Hub BoosterPack.

I am using CCS  Version: 6.0.0.00156  and the senshub_iot example.

Everything is working fine and the launchpad is connecting to https://ti.exosite.com and recording button pushes etc.

What I would like is guidance on how to get the board to report an additional sensor like the Intersil ISL29023 ambient and infrared light sensor displaying data on the dashboard?

  • Hi John,

          I think the ti exosite, is just to demo toggling leds and logging temperature.

          There is a free exosite developer account that you can try. See, link below.

          http://exosite.com/platform/pricing/

    -kel

  • You can easily add new data ports (data sources) to your Connected LaunchPad running in Exosite.  To do this, you have to add the data source to your Exosite device in the web portal and then update the code running on the Connected LaunchPad to read/write from it.

    When you add a data source to your device on Exosite, you give it a friendly name (e.g. Temperature), an alias (e.g. temp) and a type (string, integer, float).

    Here is a support article on adding a data source in Exosite's Portals interface - https://support.exosite.com/hc/en-us/articles/200679260-Manage-Pages-Data-Sources

    A direct link to the data source manage page is here: https://ti.exosite.com/manage/data

    Then in the source code on the CLP, you simply need to add code to read or write from that alias with the HTTP calls (POST and GET) in addition to the other calls to the other dataport aliases.  (like junction temperature, LED controls, etc)

    Exosite's APIs are openly documented if you want to see the HTTP syntax: https://github.com/exosite/api

    One other note, the firmware is designed to provision as a TI device in Exosite, which is only available under ti.exosite.com.  If you sign up for another free account under portals.exosite.com, you won't be able to add your TI device there.  When the CLP activates with Exosite, it uses it's MAC address in addition to vendor (TI) and specific client model (EK-TM4C1294XL Connected Launchpad) so we match the user who added the device with the actual device.  The device then receives an Exosite CIK and stores this in non-volatile memory so it can access the Exosite APIs.

    Hope this helps!

    Thanks,

    -Mike

  • We (Exosite) did not have time to complete a different client model when TI released the code for the Connected LaunchPad to support the SENSEHUB demo included in the code release (senshub_iot).  

    We are planning to release a new client model that will support this and have all of the data sources available , but it will be a few weeks before complete.

    I can tell you the dataports you'll need to add your self to your virtual connected launchpad in your Exosite portal and what the format of each is. Note that the data sent is in JSON formatted strings and you'll have to parse the data out via a Lua script (Scripts) or with Javascript in a custom widget.

    The format of the data looks like for example for the SHT21 sensor as it has multiple sensors in it:

     {"sSHT21Data_t":{"bActive":1,"fTemperature":27.925,"fHumidity":0.317}}

    To create the dataports on your Exosite virtual device client (assume you already went through the quick start steps) to store the incoming data, follow these instructions:

    1. Go to https://ti.exosite.com/manage/devices and click on your device
    2. On the pop-up window, there is an 'Add Data' link in the right top corner, click this and add the following (once for each data source listed)

    Dataports to add 

    Friendly NameTypeAlias
    BMP180 Data string bmp180_json
    Complimentary DCM Data string compdcm_json
    ISL29023 Data string isl29023_json
    SHT21 Data string sht21_json
    TMP006 Data string tmp006_json
    Task Statistics string taskstats_json

    To add Lua scripts, go to https://ti.exosite.com/manage/scripts

    An example script to get the data out of SHT21 (temp, humidity) would be like this:
    Note that you have to add additional dataports to hold the real values, I didn't list those above.

     

    local sht21_json = alias['sht21_json']
    local sht21temp = alias['sht21temp'] --Note: create this dataport as a float
    local sht21humid = alias['sht21humid']  --Note: create this dataport as a float
    
    -- {"sSHT21Data_t":{"bActive":1,"fTemperature":27.925,"fHumidity":0.317}}
    
    
    while true do
      local ts1 = sht21_json.wait()
      if ts1 ~= nil then
        local jsonobj = json.decode(sht21_json[ts1])
        if jsonobj ~= nil then
          if jsonobj.sSHT21Data_t then
            if jsonobj.sSHT21Data_t.fTemperature then
              sht21temp.value = jsonobj.sSHT21Data_t.fTemperature
            end
            if jsonobj.sSHT21Data_t.fHumidity then
              sht21humid.value = jsonobj.sSHT21Data_t.fHumidity
            end
          end
        end
      end
      -- make sure we don't get behind, some data 'could' be passed 
      sht21_json.last = now
    end

  • As a follow up, we've posted Lua scripts that can be used to handle and parse data from the Connected LaunchPad when using the 'senshub_iot' project in the TivaWare code.   

    https://github.com/exosite-garage/clp_sensorhub_support

  • @Mike.

        Thanks for sharing. I downloaded a copy.

    - kel