i2ctmp007


Example Summary

Sample application to read temperature value from a TMP007 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>. Depending on your board, there will either be an onboard TMP007 sensor, or you will need the Sensors Boosterpack.

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. Uses the I2C driver to get data from the TMP007 sensor.

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

  4. The task sleeps for 1000 system ticks.

  5. 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: