rotateZ() not working as expected

I will need (want!) to get a device with more than x, y, z acceleration to work with to be of more assistance.

I grappled with all this a few weeks back with my simple accelerometer and started to get a handle on it.

Also my statement about yaw “I would have needed another accelerometer mounted at 90 deg for this axis.” is incorrect and this will not work since those axis would also be perpendicular to gravity.

Try the Arduino plotter to visualize the data; one of my favorite tools.

Consider doing a trim() on strings before converting to a float.
Look at one of my earlier posts about this:
https://discourse.processing.org/t/school-project-problem-arduino/433/5.

Is the data output from the library an angle or a vector component?

This really has me interested! I programmed a Quaternion class last week and still thinking in vectors.

GLV