Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: BNO055_HelloWorld robfish_test_IMU_and_hallsensor SCRIBE_stepper SCRIBE_servo ... more
Diff: BNO055.cpp
- Revision:
- 2:695c6e5d239a
- Parent:
- 1:2c3322a8d417
- Child:
- 3:1db1628eb8b2
diff -r 2c3322a8d417 -r 695c6e5d239a BNO055.cpp
--- a/BNO055.cpp Sat May 30 18:36:36 2015 +0000
+++ b/BNO055.cpp Sat May 30 19:08:59 2015 +0000
@@ -194,6 +194,19 @@
quat.z = float(quat.rawz)/16384.0f;
}
+void BNO055::get_angles(void){
+ tx[0] = BNO055_EULER_H_LSB_ADDR;
+ _i2c.write(address,tx,1,true);
+ _i2c.read(address+1,rawdata,6,0);
+ angles.rawyaw = (rawdata[1] << 8 | rawdata[0]);
+ angles.rawroll = (rawdata[3] << 8 | rawdata[2]);
+ angles.rawpitch = (rawdata[5] << 8 | rawdata[4]);
+ angles.yaw = float(angles.rawyaw)*angle_scale;
+ angles.roll = float(angles.rawroll)*angle_scale;
+ angles.pitch = float(angles.rawpitch)*angle_scale;
+}
+
+
void BNO055::get_temp(void){
readchar(BNO055_TEMP_ADDR);
temperature = rx / temp_scale;
Bosch Sensortech BNO055