 void setup() {
 
   Serial.begin(baud);
-  
-  Wire.begin(slaveAdd);
-  Wire.onReceive(receiveRegister);
-  Wire.onRequest(respondData);
+
+  Wire.begin();
+
+  // the following code when Arduino is I2C slave
+  //Wire.begin(slaveAdd);  
+  //Wire.onReceive(receiveRegister);
+  //Wire.onRequest(respondData);
   // I2C clock freq; don't set this register on DUE: there are currently issues
-  TWBR=100000L; 
+  //TWBR=100000L; 
   
   withGyro.init();
   noGyro.init();

    (int)noGyro.head,  (int)withGyro.head);
   Serial.println(report);
  }
  
 if (RPH) {
    Serial.print("RPH ");
    Serial.print((int)withGyro.roll);
    Serial.print(",");
    Serial.print((int)withGyro.pitch);

  registerAddr = Wire.read();
}

void respondData(){  // debug
  Wire.write(registerAddr);  
}
/*
void respondData(){
  char dataValue = 0x01;  // default value, debug value 5
  if ((registerAddr >= 0x00) && (registerAddr < 0x0c)) {
    dataValue = data[registerAddr]; 
  }
  Wire.write(dataValue);
}
*/

void printResults() {

