

Once the connection has been made, you can check the devices connected to the bus by typing the command in the terminal: i2cdetect -y 1 In the menu, select “5 – Interfacing Options” then “P5 I2C” and validate. To do this enter the following command in a terminal: sudo raspi-config To use the Raspberry Pi’s I2C interface, it must be enabled in the configuration menu. The grounds of the two cards must be connected to establish a common potential reference. One is the Serial Data Line (SDA) and the other synchronization clock (SLC Serial Clock Line). The pins used for I2C communication are usually fixed for each device. An I2C communication is defined by a two-wire bus (sometimes called TWI, Two Wire Interface) and an address. To establish I2C communication between Raspberry Pi and Arduino, we need to physically connect the bus which uses 3 pins. Prerequisites: I2C communication with Arduino, Remote access to Raspberry Pi with VNC Matériel This also makes it possible to add several devices on the same bus and increase the capabilities of the RaspberryPi tenfold. If the Raspberry Pi card and the Arduino card are in close proximity, the I2C bus is a good choice of communication protocol. The computing power and wireless functionality of the Raspberry Pi coupled with the input/output capability of the Arduino, results in a complete control system to drive any project.

In some projects, it may be interesting to establish I2C communication between Raspberry Pi and Arduino.
