Skip to main content

Configuring I2C

Requirement: Special hardware is connected via I²C.

The I2CExample.project project contains an application which controls various chips and breakouts connected via I²C.

Connected hardware:

  • Adafruit 16-channel/12-bit PWM

  • SRF02 (ultrasonic distance sensor)

  • Drotek IMU 9DOF - MPU9150 (gyroscope, accelerometer, magnetoscope)

The Raspberry I2C <name>libraries, which enable the connection, are available to you as source code. They can be used as an example for other connections.

The Raspberry Pi Peripherals library is the basis for communication via I²C. Their interfaces are documented both in the help and in the Library Manager.