Objective:
Understand master-slave communication between two Arduino boards using I2C (Inter-Integrated Circuit) protocol.
Steps to Perform:
- Click "Start Simulation" to power up both Arduino circuits
- Click on the push button on the master Arduino
- Observe how the master reads button state and sends it via I2C
- The slave Arduino receives the data and controls its LED accordingly
- 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