Usage:
In our Sensors class:
private ADXL345_I2C_SparkFun m_accel;
private GyroITG3200 m_gyro;
In our Sensors() constructor:
m_accel = new ADXL345_I2C_SparkFun(I2C.Port.kOnboard, Accelerometer.Range.k16G);
m_gyro = new GyroITG3200(I2C.Port.kOnboard);
m_gyro.initialize();
Methods to get Gyro data:
public double getAngleX() {
return m_gyro.getRotationX();
}
public double getAngleY() {
return m_gyro.getRotationY();
}
public double getAngleZ() {
return m_gyro.getRotationZ();
}