Simulation of establishing master slave model using Arduino and I2C Protocols:

interfacing

Instructions

Objective:

Understand master-slave communication between two Arduino boards using I2C (Inter-Integrated Circuit) protocol.

Steps to Perform:

  1. Click "Start Simulation" to power up both Arduino circuits
  2. Click on the push button on the master Arduino
  3. Observe how the master reads button state and sends it via I2C
  4. The slave Arduino receives the data and controls its LED accordingly
  5. Switch between Master.ino and Slave.ino tabs to view both codes

Key Concepts:

  • I2C Protocol: Two-wire serial communication between devices
  • Master Device: Initiates communication and controls the clock line
  • Slave Device: Responds to master's requests with unique address
  • Wire.begin(): Initialize I2C communication (master or slave)
  • Wire.write(): Master sends data to slave device
  • Wire.read(): Slave receives data from master
Arduino Code