Created
June 15, 2020 13:08
-
-
Save costyn/e52fd7a7ac0043b09e89e673ad484ecb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <Arduino.h> | |
#include "MPU6886.h" | |
static MPU6886 mpu; | |
void setup(void) | |
{ | |
Serial.begin(115200); | |
mpu.Init(); | |
} | |
void loop(void) | |
{ | |
float x, y, z; | |
float pitch,roll,yaw; | |
mpu.getAccelData(&x, &y, &z); | |
mpu.getAhrsData(&pitch, &roll, &yaw); | |
Serial.printf("accel: %f.6\t%f.6\t%f.6\n", &x, &y, &z); | |
Serial.printf("pitch: %.6f\t roll %.6f\t yaw %.6f\n", &pitch, &roll, &yaw); | |
delay(100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment