Go back to the scanner code. You must be able to scan for the address of the chip before trying anything else.
// I2C Scanner
// Written by Nick Gammon
// Date: 20th April 2011
//Modified 16/1/2015 M Sandercock - allow re-scanning in loop()
//Modified 13/3/2015 M Sandercock - test Wire1 and allow output on DUE native port.
#include <Wire.h>
#define SerialPort SerialUSB //for testing on Arduino DUE native port (SerialUSB) or programming port (Serial)
#define I2C Wire1 //for testing either Wire or Wire1
void setup() {
SerialPort.begin (115200);
} // end of setup
void loop() {
SerialPort.println ();
SerialPort.println ("I2C scanner. Scanning ...");
byte count = 0;
I2C.begin();
for (byte i = 8; i < 120; i++)
{
I2C.beginTransmission (i);
if (I2C.endTransmission () == 0)
{
SerialPort.print ("Found address: ");
SerialPort.print (i, DEC);
SerialPort.print (" (0x");
SerialPort.print (i, HEX);
SerialPort.println (")");
count++;
delay (1); // maybe unneeded?
} // end of good response
} // end of for loop
SerialPort.println ("Done.");
SerialPort.print ("Found ");
SerialPort.print (count, DEC);
SerialPort.println (" device(s).");
SerialPort.println();
SerialPort.println("Press any key to re-scan");
SerialPort.print(">");
while(!SerialPort.available()) {
delay(100); //wait, let some characters come into the serial buffer
}
while(SerialPort.available()) {
SerialPort.read(); //clear the serial buffer
}
}[/code