Merge pull request #44 from coelner/errorfix

Errorfix
This commit is contained in:
claws authored and GitHub committed 2018-03-07 20:52:38 +00:00
commit 68afd58201
1 file changed
+2 -1
+2 -1
View File
@@ -141,7 +141,7 @@ uint16_t BH1750::readLightLevel(bool maxWait) {
}
// Measurement result will be stored here
uint16_t level(NAN);
uint16_t level=65535;
// Send mode to sensor
Wire.beginTransmission(BH1750_I2CADDR);
@@ -171,6 +171,7 @@ uint16_t BH1750::readLightLevel(bool maxWait) {
maxWait ? _delay_ms(180) :_delay_ms(120);
}
break;
default: break;
}
// Read two bytes from the sensor, which are low and high parts of the sensor