i2c_master_read_sensor_p3t1755#
Overview#
The example shows how to use lpc_i2c 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-MCXW23
Hardware requirements
Type-C USB cable
FRDM-MCXW23 Board
Personal Computer
Board settings
No special is needed.
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J10.
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