Bukit Mertajam, Penang

I2C Communication Between Raspberry Pi and Arduino


Besides controlling I2C modules, like display and sensors, I2C communication also can be implemented between 2 controllers. For example between Raspberry Pi and Arduino. The different compare to I2C module is, we need to create our own data protocol. So this tutorial will show you how to communicate between Raspberry Pi and Arduino Using I2C.

You may need to refer following tutorial first:

  1. Getting Started with Raspberry Pi Zero W
  2. How to Display on I2C OLED Using Raspberry Pi


This video will show you how to communicate between Rasapberry Pi and Arduino Using I2C.

Sample Code

This is the sample code for Arduino and Raspberry Pi used in the video.

Thank You


  1. Controlling an Arduino from a Pi3 using I2C
  2. i2c python documentation
  3. Raspberry Pi SPI and I2C Tutorial
  4. Master Writer/Slave Receiver

Thanks for reading this tutorial. If you have any technical inquiry, please post at Cytron Technical Forum.

Leave a comment