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.

CCS/CC2650STK: Send temperature data in simple_broadcaster

Part Number: CC2650STK

Tool/software: Code Composer Studio

Hi all,

I am trying to add temperature data to the advertisement payload in simple_broadcaster (in examples/cc2650lp). The problem is that I have no idea how to add the temperature sensor driver into the application. If I compare the project to the sensortag one (in examples/cc2650stk) I see that the latter has I2C drivers and Middleware containing code for the temperature sensor. I would like reproduce that structure in simple_broadcaster to be able to read temperature date, but I have no idea of:

- what to add (which source files)

- where to add it (Driver? Application? Middleware?)

- from where should I add it

Is there any tutorial on adding the temperature sensor driver to a project that does not use sensors? I guess this also apply to simple_peripheral, if there is any demo for that I will apply to the other, but I did not find anything useful, and I would very much like to avoid starting from the sensortag project and scraping stuff I do not need from there, since the simple_broadcaster is almost what I need if I can plug temperature in.

For your reference I am using CCS to build the code

Thanks a lot,

Ale

  • Hi Ale,

    I think your best bet is to take a look at our advertising and scanning module in simplelink academy to get familiar with how the advertisement data and scan response data can be changed.

    Then is just a matter of changing the data when new sensor information is available.

    Find simplelink academy on http://dev.ti.com/tirex/#/

    Regards,
    Rebel
  • Hi Rebel,

    Thanks a lot for the prompt reply.

    Unfortunately, my problem is not about changing the advertised data (I know to do so), but rather how to read the temperature sensor in the simple_broadcaster example. The simple_broadcaster does not have any temperature data, since the TMP_007 driver is not included in that project. I need some pointers on how to read temperatures in the simple_broadcaster, i.e. which files I have to "clone" from the sensortag project (which includes temperature reading) to get the temperature sensor up and running.

    Thanks once more,
    Ale
  • Hi Ale,

    From just glancing at the datasheet, it looks like it's an I2C device.

    The easiest way would be to use the TI I2C driver, software-dl.ti.com/.../_i2_c_c_c26_x_x_8h.html

    (Which if you look at the sensortag code, ultimately uses with SensorI2C.c via SensorTmp007.c and sensortag_tmp.c)

    You could try to copy and paste the code, I don't know how much harder that'd be to integrate.

    Regards,
    Rebel
  • Hi Rebel,

    Thanks a lot for your help, I had a closer look at the sensortag project and I got it working. I had to add some files to the broadcatser project to enable I2C (as seen in the driver folder on the sensortag project) and the temperature sensor (the sensortag_tmp files in the application folder of the sensortag project and the sensortmp007 files in the middleware/sensor folder of the sensortag project).

    Cheers,
    Ale