What is corrrect the way to find roll, pitch, yaw?
For a stationary accelerometer sensing the acceleration of gravity, I see "dead zones" when the Pitch, Yaw or Roll axes are parallel or close to parallel to the gravity vector.

Likely this is why accelerometers are used in conjunction with gyroscopes.

Refer to this NXP (aka Motorola, Freescale &amp; Qualcomm) document for an in depth discussion regarding the necessary math.  Note the section regarding "Regions of Instability".

Also, refer to this class and this class from rutgers.edu which work students through a project using an Arduino and an accelerometer in the 1st class then adds a gyroscope in the 2nd class to improve the response.

(Added Later)

The rutgers.edu links don't appear to work anymore and this link has been suggested as an alternative.