README

SysConfig Notice

All examples will soon be supported by SysConfig, a tool that will help you graphically configure your software components. A preview is available today in the examples/syscfg_preview directory. Starting in 3Q 2019, with SDK version 3.30, only SysConfig-enabled versions of examples will be provided. For more information, click here.


i2ctmp


Example Summary

Sample application that reads the temperature from a TMP sensor.

Peripherals Exercised

Resources & Jumper Settings

If you’re using an IDE (such as CCS or IAR), please refer to Board.html in your project directory for resources used and board-specific jumper settings. Otherwise, you can find Board.html in the directory <SDK_INSTALL_DIR>/source/ti/boards/<BOARD>.

Example Usage

The connection will have the following settings:

    Baud-rate:     115200
    Data bits:          8
    Stop bits:          1
    Parity:          None
    Flow Control:    None

Application Design Details

This application uses one task:

'getTempTask' - performs the following actions:

  1. Opens and initializes an I2C driver object.

  2. Determines which TMP sensor is available. Attempts to find a TMP116 first, and then a TMP006.

  3. Uses the I2C driver to get data from the TMP sensor.

  4. Extracts the temperature (in Celsius) and prints the value via the UART.

  5. The task sleeps for 1 second.

  6. After 20 temperature samples are recovered, the I2C peripheral is closed and the example exits.

TI-RTOS:

FreeRTOS:

Code Composer Studio:

SimpleLink Sensor and Actuator Plugin: