Open ozanio opened 9 years ago
I guess you should post the complete code, makes it easier for others to debug.
use getMotion6()
mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
to get all 3 accelerations and gyroscopes
Use int gyro[3]
instead of float gyro[3]
I have tried adding the line mpu.dmpGetGyro(gyro, fifoBuffer); as below
mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetGyro(gyro, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
but I get a "gyro was not declared in this scope error" so I added the line "float gyro[3];" at the top of the code where float euler[3]; was which gave me a "no matching function error"
How can I fix this?