Skip to content

Combination BME280/BNO055 #1

@RRz1980

Description

@RRz1980

Hello,
Sorry, I have only very basic knowledge on sensor communications. I could run a bme280 and also BNO055, separately without problem. The problem is when I combine both and override the wiring. Then the BME280 does not work anymore.
As you see here, the BME280 uses different SDA and SCL than BNO055 and I don't know how to define the I2C communication for both sensors.
Many thanks for your help!

//+++++++++++++++++++++++++++++++++++++++++++++++ Start and test BME280 Sensor
Serial.println(F("BME280 test"));
I2CBME.begin(21, 22, 100000); // BME 280 I2C_SDA, BME280 I2C_SCL
bool status;
status = bme.begin(0x76, &I2CBME);
Serial.println("-- Test --");

//+++++++++++++++++++++++++++++++++++++++++++++++ Start BNO055 Sensor
Wire.begin(14, 15, 400000); // (SDA, SCL) (14, 15) are default on ESP32, 400 kHz I2C bus speed
pinMode(intPin, INPUT);
pinMode(myLed, OUTPUT);
digitalWrite(myLed, HIGH);
I2Cscan(); // check for I2C devices on the bus8
// Read the WHO_AM_I register, this is a good test of communication
Serial.println("BNO055 9-axis motion sensor...");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions