1. From I2C Master, I executed the following codes:
void loop()
{
Wire.beginTransmission(8);
Wire.println();
Wire.endTransmission();
delay(1500);
}
2. At the I2C Slave side, I executed the following codes:
void loop()
{
if (flag == true)
{
Serial.println(x1, HEX);
flag = false;
}
}
void receiveEvent(int howMany)
{
x1 = Wire.read();
flag = true;
}
3. The Slave's Serial Monitor Shows:
23:49:07.799 -> D