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:
This video will show you how to communicate between Rasapberry Pi and Arduino Using I2C.
This is the sample code for Arduino and Raspberry Pi used in the video.