From 0c198dd7959ab699d622ba842af1c7f3a75b9aba Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 18 Aug 2019 00:32:24 +0200 Subject: [PATCH] initialize spi3w_en No other code path seems to initialize this variable to a defined value. Ensure set to SPI 4W. --- Adafruit_BME280.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Adafruit_BME280.cpp b/Adafruit_BME280.cpp index 7b89736..06f211c 100644 --- a/Adafruit_BME280.cpp +++ b/Adafruit_BME280.cpp @@ -184,6 +184,7 @@ void Adafruit_BME280::setSampling(sensor_mode mode, _humReg.osrs_h = humSampling; _configReg.filter = filter; _configReg.t_sb = duration; + _configReg.spi3w_en = 0; // you must make sure to also set REGISTER_CONTROL after setting the // CONTROLHUMID register, otherwise the values won't be applied (see