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.
Revision 8:c0e576c0b458, committed 2019-06-22
- Comitter:
- Robo_DOGUMA
- Date:
- Sat Jun 22 00:15:47 2019 +0000
- Parent:
- 7:e9b258eaa3a4
- Commit message:
- BNO055
Changed in this revision
BNO055.cpp | Show annotated file Show diff for this revision Revisions of this file |
BNO055.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/BNO055.cpp Sat Jan 19 06:43:46 2019 +0000 +++ b/BNO055.cpp Sat Jun 22 00:15:47 2019 +0000 @@ -10,7 +10,17 @@ angle_scale = 1.0f/16.0f; temp_scale = 1; } - + +BNO055::BNO055(I2C& i2c) : _i2c(i2c) +{ + _i2c.frequency(400000); + address = BNOAddress; + accel_scale = 0.001f; + rate_scale = 1.0f/16.0f; + angle_scale = 1.0f/16.0f; + temp_scale = 1; +} + void BNO055::reset(){ //Perform a power-on-reset readchar(BNO055_SYS_TRIGGER_ADDR);
--- a/BNO055.h Sat Jan 19 06:43:46 2019 +0000 +++ b/BNO055.h Sat Jun 22 00:15:47 2019 +0000 @@ -180,7 +180,7 @@ /** Create BNO055 instance **/ BNO055(PinName SDA, PinName SCL); - + BNO055(I2C& _i2c); /** Perform a power-on reset of the BNO055 **/ void reset(); /** Check that the BNO055 is connected and download the software details