Skip to content

Commit

Permalink
Merge pull request #44 from coelner/errorfix
Browse files Browse the repository at this point in the history
Errorfix
  • Loading branch information
claws authored Mar 7, 2018
2 parents 81f8cbb + 7cd0e70 commit 68afd58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BH1750.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 68afd58

Please sign in to comment.