mpu9250-pitch,roll and yaw

hi all, im new here so maybe my question will be stupid

what is the formula to convert my raw mpu9250(9DOF) data to pitch,roll and yaw angles???

please help

That part has a lot of registers to read to obtain the info you're looking for.
I'd suggest you search for an I2C or SPI library that can do that already.
https://www.digikey.com/en/product-highlight/i/invensense/mpu-9250-9-axis-gyro-accel-magnet

https://store.invensense.com/datasheets/invensense/MPU9250REV1.0.pdf

Hi arafat1,

Kris Winer has some excellent Arduino example code for the MPU9250 on Github: GitHub - kriswiner/MPU9250: Arduino sketches for MPU9250 9DoF with AHRS sensor fusion.

By far the best open-source IMU (absolute orientation) code for the MPU9250 is RTIMUlib for Arduino.

thanks all i ended up using Kris Winer example and its very good.