calibration.ino 323 B

12345678910111213141516171819202122
  1. #include "MPU9250.h"
  2. MPU9250 mpu;
  3. void setup() {
  4. Serial.begin(115200);
  5. Wire.begin();
  6. delay(2000);
  7. mpu.setup(0x68); // change to your own address
  8. delay(5000);
  9. // calibrate anytime you want to
  10. mpu.calibrateAccelGyro();
  11. mpu.calibrateMag();
  12. mpu.printCalibration();
  13. }
  14. void loop() {
  15. }