Giter VIP home page Giter VIP logo

zpower_system's Introduction

Example Summary

Sample application to read temperature value from a TMP007 I2C temperature sensor.

Peripherals Exercised

  • Board_GPIO_LED0 - Indicator LED
  • Board_I2C_TMP - I2C used to communicate with TMP007 sensor.
  • The Sensors Boosterpack (http://www.ti.com/tool/boostxl-sensors) was used. It has the TMP007 sensor along with several other nifty sensors.

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

  • Open a serial session (e.g. PuTTY, etc.) to the appropriate COM port. *The COM port can be determined via Device Manager in Windows or via ls /dev/tty* in Linux.

The connection will have the following settings:

    Baud-rate:     115200
    Data bits:          8
    Stop bits:          1
    Parity:          None
    Flow Control:    None
  • Run the example. Board_GPIO_LED0 turns ON to indicate driver initialization is complete.

  • The example will request temperature samples from the TMP007 and print them via the UART. A total of 20 temperature samples are read/printed before the example exits. Terminal 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 tasks:

'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:

  • When building in Code Composer Studio, the kernel configuration project will be imported along with the example. The kernel configuration project is referenced by the example, so it will be built first. The "release" kernel configuration is the default project used. It has many debug features disabled. These feature include assert checking, logging and runtime stack checks. For a detailed difference between the "release" and "debug" kernel configurations and how to switch between them, please refer to the SimpleLink MCU SDK User's Guide. The "release" and "debug" kernel configuration projects can be found under <SDK_INSTALL_DIR>/kernel/tirtos/builds/<BOARD>/(release|debug)/(ccs|gcc).

FreeRTOS:

  • Please view the FreeRTOSConfig.h header file for example configuration information.

Code Composer Studio:

  • When using in CCS for the CC3220 devices, it's recommended you do a "Free Run" instead of "Run". This is because when the CC3220 device goes into low power mode, emulation is lost.

SimpleLink Sensor and Actuator Plugin:

  • This example uses a TMP007 sensor. It interfaces via the I2C Driver. For a richer API set for the TMP sensors, please refer the SimpleLink Sensor and Actuator Plugin. This plugin also offers a Button module to handle debounce also.

zpower_system's People

Contributors

tjdawkins avatar

Watchers

Wayne Cheung avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.