#include<Wire.h>voidsetup(){Wire.begin();// Join I2C bus (address is optional for controller device)
Serial.begin(9600);// Start serial for output
}voidloop(){Wire.requestFrom(2,6);// Request 6 bytes from slave device number two
// Slave may send less than requested
while(Wire.available()){charc=Wire.read();// Receive a byte as character
Serial.print(c);// Print the character
}delay(500);}