| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
TWI Sensor Example

The TWI Sensor Example demonstrates how to use the I2C interface by communicating with the thermometer (LM75). Data is collected from the thermometer and sent by UART.

This example assumes that an mbed application shield is used and that the SDA and the SCL lines are connected to Arduino define pins.

You can find the source code and the project file of the example in the following folder: `<InstallFolder>\examples\peripheral\twi_sensor`

# Testing

Test the TWI Sensor Example application by performing the following steps:

1. Connect the mbed application shield to the development board.
2. Compile and program the application.
3. Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:
   - Baud rate: 115.200
   - 8 data bits
   - 1 stop bit
   - No parity
   - HW flow control: RTS/CTS
4. Observe the data from the thermometer.