Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calibration example #40

Open
marcwitteveen opened this issue Jan 27, 2022 · 1 comment
Open

Calibration example #40

marcwitteveen opened this issue Jan 27, 2022 · 1 comment

Comments

@marcwitteveen
Copy link

How do you use the calibration method? I call the method calibration but there is still offset and drift... anybody have a code example?

@Palla551
Copy link

Hi, I guess is a llitle bit late but here's how I got the calibration to work

void setup() {
  Serial.begin(115200);

  Wire.begin(32, 33);

  imu.settings.device.commInterface = IMU_MODE_I2C;  // Set mode to I2C
  imu.settings.device.mAddress = LSM9DS1_M;          // Set mag address to 0x1E
  imu.settings.device.agAddress = LSM9DS1_AG;        // Set ag address to 0x6B

  if (imu.begin() == false) {
    Serial.println("Failed to communicate with LSM9DS1.");
    while (1)
      ;
  }

  imu.calibrate(true);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants