Revision 881d8ad0
examples/sensorapi/sensorapi.ino | ||
---|---|---|
95 | 95 |
void loop(void) |
96 | 96 |
{ |
97 | 97 |
// Possible vector values can be: |
98 |
// - VECTOR_ACCELEROMETER |
|
99 |
// - VECTOR_MAGNETOMETER |
|
100 |
// - VECTOR_GYROSCOPE |
|
101 |
// - VECTOR_EULER |
|
102 |
// - VECTOR_LINEARACCEL |
|
103 |
// - VECTOR_GRAVITY |
|
98 |
// - VECTOR_ACCELEROMETER - m/s^2
|
|
99 |
// - VECTOR_MAGNETOMETER - uT
|
|
100 |
// - VECTOR_GYROSCOPE - rad/s
|
|
101 |
// - VECTOR_EULER - degrees
|
|
102 |
// - VECTOR_LINEARACCEL - m/s^2
|
|
103 |
// - VECTOR_GRAVITY - m/s^2
|
|
104 | 104 |
imu::Vector<3> euler = bno.getVector(Adafruit_BNO055::VECTOR_EULER); |
105 | 105 |
Serial.print("X: "); |
106 | 106 |
Serial.println((int)euler.x(), DEC); |
... | ... | |
110 | 110 |
Serial.println((int)euler.z(), DEC); |
111 | 111 |
Serial.println(""); |
112 | 112 |
|
113 |
/* |
|
113 | 114 |
imu::Quaternion quat = bno.getQuat(); |
114 | 115 |
Serial.print("qW: "); |
115 | 116 |
Serial.println((int)quat.w(), DEC); |
... | ... | |
120 | 121 |
Serial.print("qZ: "); |
121 | 122 |
Serial.println((int)quat.z(), DEC); |
122 | 123 |
Serial.println(""); |
124 |
/* |
|
123 | 125 |
|
124 | 126 |
delay(BNO055_SAMPLERATE_DELAY_MS); |
125 | 127 |
} |
Also available in: Unified diff