I’ve recently bought a few sensor modules for my planned revamp of my RF24 network. I also found this website which seems to be a guy who has been playing with many of the same sensors!

First off we have the BH1750FVI light intensity sensor. I connected to a Nano like so:

1
2
3
4
5
6
BH1750 - Nano3:
VCC - 3.3v
GND - GND
SCL - SCL (a5)
SDA - SDA (a4)
ADD - Not connected

The ebay listing says 3-5v power, and I must say I connected it to 5v just fine, but better go with 3.3v for safety.

I found that the readings were approximately:

1
2
3
4
2000 = sunny
200 = indoors day
100 = indoors night
0 = pitch black

The library I used was from Github and my code is below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <Wire.h>
#include <BH1750.h>
BH1750 lightMeter;
int lux = 0;
int last_reading = 0;
void setup()
{
Serial.begin(9600);
lightMeter.begin();
}
void loop()
{
lux = lightMeter.readLightLevel();
if (lux != last_reading)
{
Serial.println(lux);
last_reading = lux;
}
}