lpi2c_master_read_sensor_p3t1755#
Overview#
The example shows how to use lpi2c driver as master to read temperature data from sensor P3T1755.
The example will do dynamic address assignment to the P3T1755 sensor, read the temperature data and print it in while loop.
Supported Boards#
FRDM-MCXC162
Hardware requirements
Type-C USB cable
FRDM-MCXC162 board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
When the example runs successfully, you can see the similar information from the terminal as below.
i2c master read sensor data example.
Temperature:29.062500