Skip to content

Commit

Permalink
Updating datasheet url and datasheet references.
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Mar 30, 2017
1 parent 7317636 commit 595549c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/light.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,11 @@ var Controllers = {
}
},
BH1750: {
//http://rohmfs.rohm.com/en/products/databook/datasheet/ic/sensor/light/bh1750fvi-e.pdf
//code based on Arduino library https://github.com/claws/BH1750
//currently only "continuous H-resolution" mode supported
// http://cpre.kmutnb.ac.th/esl/learning/bh1750-light-sensor/bh1750fvi-e_datasheet.pdf
// https://www.mysensors.org/dl/57cc6e4595afb8801e529dab/design/bh1750fvi-e.pdf
//
// code based on Arduino library https://github.com/claws/BH1750
// currently only "continuous H-resolution" mode supported
ADDRESSES: {
value: [0x23, 0x5C]
},
Expand All @@ -424,7 +426,9 @@ var Controllers = {
},
toIntensityLevel: {
value: function(raw) {
return toFixed(raw / 1.2, 2);
// Page 2.
// H-Resolution Mode Resolution rHR - 1 - lx
return Math.round(raw / 1.2);
}
}
},
Expand Down

0 comments on commit 595549c

Please sign in to comment.