hnct-robocon / BNO055
Revision:
8:c0e576c0b458
Parent:
6:1f722ffec323
--- 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);