calculate pitch yaw and roll using mpu9250 and arduino uno

im trying to obtain the roll pitch and yaw with the MPU9250 imu hardware and the library that is in the link below, but i cant do it properly or at leats i guess im doing it not properly, because i can obtain the roll and pitch angles but in a range of 90 degres, if i go further and i continue to moving it in a mayor angle of inclination on roll and pitch the degress return to 0, i dont know how to handle this kind of scenarios, and i getting troubles to calculate te yaw all the formules that i have found on the internet doesnt seems to work can you please help me on this, thank you in advance

Can you please someone tell how to get roll pitch yaw data??

the library is there, i try other ones but this is the onlye one that i can make it work, and that is correctly explained in my opinion:

the imu that im working on is this one (actually looks the same is identical, i mention this because i see on the web that it comes in diferent presentations i guess):

i use formulas based on the next sites:

the code im what im working is this (i have various kinds of serial outs because im working on parallel on a vi that receives the data and presented in a kind of virtual horizon, and also have diferent entries that refers to pitch and roll based on the things that i found on internet and i have been testing):

thanks in advance

mpu9250_07-11-2018.ino (6.69 KB)