9#if defined(ARDUINO) && !defined(UDON_TEENSY_I2C_SLAVE_MODE)
11# include <Udon/Thirdparty/Adafruit_BNO055/Adafruit_BNO055.h>
23 QuaternionDirection direction;
28 Quaternion quaternion;
34 BNO055(TwoWire& wire,
const QuaternionDirection& direction = {
true,
true,
true })
35 : Adafruit_BNO055(-1, 0x28, &wire)
36 , direction(direction)
37 , offset(Quaternion::Identity())
38 , quaternion(Quaternion::Identity())
47 return Adafruit_BNO055::begin();
59 const auto q = Adafruit_BNO055::getQuat();
60 quaternion = { q.x(), q.y(), q.z(), q.w() };
65 Quaternion getQuaternion()
const
67 return (offset.inverse() * quaternion).directionRevision(direction);
72 Euler getEuler()
const
74 return getQuaternion().toEuler();
81 return getQuaternion().toYaw();
void Show(Args &&... args)
区切り文字ありで出力する
Definition Show.hpp:339