I want to read out the BME280 and BME680 Temp/Hum-Sensors on the same I2C interface of a ESP8266.
I have connected both in parallel to VCC, GND, SCL, SDA. Now, if I unplug any of the sensors and reset the µC, the other one works and gives out plausible values. So, the adresses are right (also cross checked with I2CScanner).
But if both are plugged in, both read "0" as temperature. What am i doing wrong?
This is my test code:
Code: Select all
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME680.h>
#include <Adafruit_BME280.h>
Adafruit_BME680 bme680;
Adafruit_BME280 bme280;
void setup()
{
Serial.begin(115200);
Serial.println("Setup...");
bme680.begin(0x77);
bme280.begin(0x76);
}
void loop()
{
bme680.performReading();
Serial.println(bme680.temperature);
delay(500);
Serial.println(bme280.readTemperature());
delay(500);
}