Lesson 6 – Serial communication (I2C)

Overview

Communicating with sensors and external components is a very common task performed by microcontrollers. The Inter-Integrated Circuit (I2C) bus is a popular protocol used to communicate with external components. In this lesson, we will go over the basics of I2C and learn how to use the I2C driver in nRF Connect SDK to interface with an external sensor.

The exercise is divided into two parts:

  • Exercise 1 – Using the X-NUCLEO-IKS01A3 expansion board on top of a DK to communicate with the STTS751 temperature sensor.
  • Exercise 2 – Using a Thingy:91 or Thingy:53 to connect to the BH1749 color sensor on the board.

The exercises both cover how to use the I2C driver, so it is sufficient to only do one of them.

Objectives

  • Learn how to use the I2C driver in nRF Connect SDK
  • Practice using the I2C driver APIs through a hands-on exercise
  • Communicate with an external sensor using the I2C bus

Special hardware requirements

  • An X-NUCLEO-IKS01A3 expansion board or a Thingy prototyping platform (Thingy:91 or Thingy:53)
Register an account
Already have an account? Log in
(All fields are required unless specified optional)

Forgot your password?
Enter your email address, and we will send a link to reset your password.