simple.ino 247 B

1234567891011121314151617
  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. }
  9. void loop() {
  10. if (mpu.update()) {
  11. mpu.printRollPitchYaw();
  12. }
  13. }