Introduction
This example demonstrates probing of sensor via I2C and read data from it. The application reads data from the temperature sensor in the EVM. Application reads 20 samples from the sensor and exits.
Supported Combinations
Parameter | Value |
CPU + OS | m4fss0-0 freertos |
m4fss0-0 nortos |
Toolchain | ti-arm-clang |
Board | xWRL6432-evm |
Example folder | examples/drivers/i2c/i2c_temperature |
Using SDK with SysConfig
A GUI tool SysConfig is used to configure different modules and peripherals of the example. Using this tool, users can select and customize different modules and peripherals. The SysConfig tool will generate the code for initializing and configuring these modules. This configuration is saved to a file called example.syscfg for every example. To know more about how to use SDK with SysConfig, Visit this page
Using SDK with SysConfig
Steps to Run the Example
See Also
I2C
Sample Output
Shown below is a sample output when the application is run,
[I2C] Temperature sensor found at device address 0x4b
[I2C] Sample 0: 30.250000 (celcius)
[I2C] Sample 1: 30.250000 (celcius)
[I2C] Sample 2: 30.250000 (celcius)
[I2C] Sample 3: 30.250000 (celcius)
[I2C] Sample 4: 30.250000 (celcius)
[I2C] Sample 5: 30.250000 (celcius)
[I2C] Sample 6: 30.250000 (celcius)
[I2C] Sample 7: 30.250000 (celcius)
[I2C] Sample 8: 30.250000 (celcius)
[I2C] Sample 9: 30.250000 (celcius)
[I2C] Sample 10: 30.250000 (celcius)
[I2C] Sample 11: 30.250000 (celcius)
[I2C] Sample 12: 30.250000 (celcius)
[I2C] Sample 13: 30.250000 (celcius)
[I2C] Sample 14: 30.250000 (celcius)
[I2C] Sample 15: 30.250000 (celcius)
[I2C] Sample 16: 30.250000 (celcius)
[I2C] Sample 17: 30.250000 (celcius)
[I2C] Sample 18: 30.250000 (celcius)
[I2C] Sample 19: 30.250000 (celcius)
All tests have passed!!