README


i2ctmp006


Example Summary

Sample application to read temperature value from a TMP006 I2C temperature 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

Console output should resemble:

        I2C Initialized!
        Sample 0: 24 (C)
        Sample 1: 24 (C)
        Sample 2: 24 (C)
        Sample 3: 24 (C)

Application Design Details

This application uses one thread:

mainThread - performs the following actions:

  1. Opens and initializes an I2C driver object.

  2. Uses the I2C driver to get data from the TMP006 sensor.

  3. Extracts the temperature (in Celsius) and prints the value onto the console.

  4. The thread sleeps for 1 second.

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

TI-RTOS:

FreeRTOS: