BME warning fix

This commit is contained in:
richonguzman
2024-05-08 15:05:43 -04:00
parent 2b6066f62e
commit 983467e059
3 changed files with 10 additions and 4 deletions

View File

@@ -13,6 +13,8 @@ extern uint32_t bmeLastReading;
float newHum, newTemp, newPress, newGas;
bool bmeSensorFound = false;
namespace BME_Utils {
@@ -32,8 +34,7 @@ namespace BME_Utils {
status = bme.begin(0x76); // Don't forget to join pins for righ direction on BME280!
if (!status) {
Serial.println("Could not find a valid BME280 or BMP280 sensor, check wiring!");
show_display("ERROR", "", "BME/BMP sensor active", "but no sensor found...");
while (1); // sacar esto para que quede pegado si no encuentra BME280
show_display("ERROR", "", "BME/BMP sensor active", "but no sensor found...", "", 2000);
} else {
#ifdef BME280Sensor
bme.setSampling(Adafruit_BME280::MODE_FORCED,
@@ -59,6 +60,7 @@ namespace BME_Utils {
bme.setIIRFilterSize(BME680_FILTER_SIZE_0);
Serial.println("init : BME680 Module ... done!");
#endif
bmeSensorFound = true;
}
} else {
Serial.println("(BME/BMP sensor not 'active' in 'igate_conf.json')");