From 179d90747868c70c9ffd8b803e257f34ae1b4257 Mon Sep 17 00:00:00 2001 From: schaeferpm <44257148+schaeferpm@users.noreply.github.com> Date: Sun, 17 May 2020 08:38:05 +0200 Subject: [PATCH] Update BH1750.cpp The configure method always pushed the old configuration to the device. --- src/BH1750.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BH1750.cpp b/src/BH1750.cpp index dd9c18f..c7469ba 100644 --- a/src/BH1750.cpp +++ b/src/BH1750.cpp @@ -102,7 +102,7 @@ bool BH1750::configure(Mode mode) { // Send mode to sensor I2C->beginTransmission(BH1750_I2CADDR); - __wire_write((uint8_t)BH1750_MODE); + __wire_write((uint8_t)mode); ack = I2C->endTransmission(); // Wait a few moments to wake up