From be3c53fdd7495657fedd8a2d00f321d21e845aec Mon Sep 17 00:00:00 2001 From: Alexandre B Date: Sun, 7 Jul 2024 14:03:48 -0400 Subject: [PATCH] Update main.cpp --- ESP32-BME280/src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ESP32-BME280/src/main.cpp b/ESP32-BME280/src/main.cpp index a30387958..cd283253d 100644 --- a/ESP32-BME280/src/main.cpp +++ b/ESP32-BME280/src/main.cpp @@ -4,7 +4,7 @@ #include #include -#define BME280 +#define BMP280 Adafruit_BME280 bme; Adafruit_BMP280 bmp; @@ -26,7 +26,7 @@ void setup() { #ifdef BME280 // BME280 - unsigned status = bme.begin();//0x76); // I2C slave address 0x76 (SDO set to GND) + unsigned status = bme.begin(BME280_ADDRESS_ALTERNATE);// 0x76); // I2C slave address 0x76 (SDO set to GND) if (!status) { Serial.println("Could not find a valid BME/BMP280 sensor, check wiring!"); Serial.print("SensorID was: 0x"); Serial.println(bme.sensorID(), 16); @@ -43,7 +43,7 @@ void setup() { } #endif #ifdef BMP280 - unsigned status = bmp.begin(); + unsigned status = bmp.begin(BMP280_ADDRESS); if (!status) { Serial.println("Could not find a valid BME/BMP280 sensor, check wiring!"); Serial.print("SensorID was: 0x"); Serial.println(bme.sensorID(), 16);