I was trying out the I2C When i noticed that Wire.write(x) always returns a 1. According to the docs it returns the following.
0: success
1: data too long to fit in transmit buffer
2: received NACK on transmit of address
3: received NACK on transmit of data
4: other error
Here is my code.
unsigned char x;
unsigned char i2cStatus=0;
void setup()
{
Serial1.begin(115200);
Serial1.println("Booted 0.1");
Wire.begin(); // join i2c bus
for(x=0;x<255;x++)
{
Wire.beginTransmission(x); // transmit to device #44 (0x2c)
i2cStatus = Wire.write(0xa5); // Just send it out so i can see it on scope
Wire.endTransmission(true);
Serial1.print("i2S staus[");
Serial1.print(x);
Serial1.print("]=");
Serial1.println(i2cStatus);
delay(100);
}