switch (i)
{
case 0:
Serial.print("Acc.x :");
break;
case 1:
Serial.print("Acc.y :");
break;
case 2:
Serial.print("Acc.z :");
break;
case 3:
Serial.print("gyro.x :");
break;
case 4:
Serial.print("gyro.y :");
break;
case 5:
Serial.print("gyro.z :");
break;
default:
Serial.print("Err");
}
Serial.println(rawSixDof[i]);
}
Serial.println("");
angle[0] = _atan2(rawSixDof[0],rawSixDof[2]);
angle[1] = _atan2(rawSixDof[1],rawSixDof[2]);
Serial.print("X:"); //pitch & roll
Serial.println(angle[0]/10.0);
Serial.print("Y:");
Serial.println(angle[1]/10.0);
Serial.println("");