# rotateZ() not working as expected

**URL:** <https://discourse.processing.org/t/rotatez-not-working-as-expected/843>\
**Category:** Development\
**Created:** [June 10, 2018, 4:09pm UTC](https://discourse.processing.org/t/rotatez-not-working-as-expected/843 "2018-06-10T16:09:18Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 10, 2018, 9:24pm UTC](https://discourse.processing.org/t/rotatez-not-working-as-expected/843/6 "2018-06-10T21:24:50Z")

</div>

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](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

---

_[View the full topic](https://discourse.processing.org/t/rotatez-not-working-as-expected/843)._
