# 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:** 9

<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 14, 2018, 10:51am UTC](https://discourse.processing.org/t/rotatez-not-working-as-expected/843/9 "2018-06-14T10:51:35Z")

</div>

I got my Adafruit BNO05 sensor!  
I do get “glitches” when I rotate at larger angles with my code and yours as well.

[https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/faqs](https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/faqs)

Adafruit states:

"The Euler angles coming out of the chip are based on ‘automatic orientation detection’, which has the drawback of not being continuous for all angles and situations.

According to Bosch BNO055 Euler angle output should only be used for eCompass, where pitch and roll stay below 45 degrees.

For absolute orientation, quaternions should always be used, and they can be converted to Euler angles at the last moment via the .toEuler() helper function in quaternion.h."

There are some related discussions on the Internet on this topic; we are not alone.

Another resource:  
[https://github.com/arduino-org/arduino-library-nine-axes-motion](https://github.com/arduino-org/arduino-library-nine-axes-motion)

---

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