    Wire.endTransmission();  
 }
 
+/*
+ * Update the acceleration and Orientation values
+ */
 void updateAccelerationAndGyro() {
    accelgyro.getMotion6(&ax,&ay,&az,&gx,&gy,&gz);//get the gyro and accelarator   
    //==========accelerator================================

   Gz=gz/131.00;
}

void updateLoudness()
{
    int getData;

   Serial.println(accelgyro.testConnection() ? "IMU connection successful":"IMU connection failure");
}

/*
 * Initialise the loudness sensor
 */
void initialiseLoudnessSensor()
{
   Wire.beginTransmission(ADDR_ADC121);        // transmit to device
