Skip to content

Commit 179d907

Browse files
committed
Update BH1750.cpp
The configure method always pushed the old configuration to the device.
1 parent 831c081 commit 179d907

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/BH1750.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ bool BH1750::configure(Mode mode) {
102102

103103
// Send mode to sensor
104104
I2C->beginTransmission(BH1750_I2CADDR);
105-
__wire_write((uint8_t)BH1750_MODE);
105+
__wire_write((uint8_t)mode);
106106
ack = I2C->endTransmission();
107107

108108
// Wait a few moments to wake up

0 commit comments

Comments
 (0)