TWI Sensor Example

nRF5 SDK v10.0.0

nRF51 SDK v10.0.0

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

This example assumes that an mbed application shield is used and that the SDA line is connected to PIN30 and the SCL line is connected to PIN7.

The name of the example is twi_sensor_ Board , where Board is the supported board. If you are not using the Keil Pack Installer, you can find the source code and 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 COM listener like PUTTY and connect to the used COM port with the following UART settings:
    • Baud rate: 38.400
    • 8 data bits
    • 1 stop bit
    • No parity
    • HW flow control: RTS/CTS
  4. Observe the data from the accelerometer.

Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone .