This is my library code (BNO055 is an IMU:accelerometer+gyroscope among other sensors)
void BNO055::init() {
// Select BNO055 config mode
writeByte(BNO055_ADDRESS, BNO055_OPR_MODE, CONFIGMODE );
delay(25);
// Select page 1 to configure sensors
writeByte(BNO055_ADDRESS, BNO055_PAGE_ID, 0x01);
// Configure ACC
writeByte(BNO055_ADDRESS, BNO055_ACC_CONFIG, APwrMode << 5 | Abw << 3 | Ascale );
// Configure GYR
writeByte(BNO055_ADDRESS, BNO055_GYRO_CONFIG_0, Gbw << 3 | Gscale );
writeByte(BNO055_ADDRESS, BNO055_GYRO_CONFIG_1, GPwrMode);
// Configure MAG
writeByte(BNO055_ADDRESS, BNO055_MAG_CONFIG, MPwrMode << 5 | MOpMode << 3 | Modr );
// Select page 0 to read sensors
writeByte(BNO055_ADDRESS, BNO055_PAGE_ID, 0x00);
// Select BNO055 gyro temperature source
writeByte(BNO055_ADDRESS, BNO055_TEMP_SOURCE, 0x01 );
// Select BNO055 sensor units (temperature in degrees C, rate in dps, accel in mg)
writeByte(BNO055_ADDRESS, BNO055_UNIT_SEL, 0x01 );
// Select BNO055 system power mode
writeByte(BNO055_ADDRESS, BNO055_PWR_MODE, PWRMode );
// Select BNO055 system operation mode
writeByte(BNO055_ADDRESS, BNO055_OPR_MODE, OPRMode );
delay(25);
}
This is the line of code I use to initialize the BNO055
sensors[0].init();
But this options are not correct
sensors[0].init().GPwrMode = Normalpwr;
Nor this
sensors[0].GPwrMode = Normalpwr;