Brand N/A
Model GY-302 BH1750
Quantity 1
Color Blue + silver
Material CCL
Specification Power supply: 3~5V; Data range: 0-65535; Sensor built-in and 16bitAD converter; Direct digital output, bypassing the complicated calculation, omit calibration; Do not distinguish between ambient light; Close to the visual sensitivity of spectral characteristics; For a wide range of brightness for 1 lux high precision measurement
English Manual/Spec Yes
Packing List 1 x Light module
1 x Pin header
Dimensions: 0.75 in x 0.51 in x 0.08 in (1.9 cm x 1.3 cm x 0.2 cm)
Weight: 0.18 oz (5 g)
Signaling Type I2C
This sketch requires BH1750.h library.
You can download the library here
https://docs.google.com/file/d/0B4qM0hq-OmC1RHhEcXRNSmZ1YW8/
/*
Example of BH1750 library usage.
This example initalises the BH1750 object using the default
high resolution mode and then makes a light level reading every second.
Connection:
VCC-5v
GND-GND
SCL-SCL(analog pin 5)
SDA-SDA(analog pin 4)
ADD-NC or GND
*/
#include
#include
BH1750 lightMeter;
void setup(){
Serial.begin(9600);
lightMeter.begin();
Serial.println(“Running…”);
}
void loop() {
uint16_t lux = lightMeter.readLightLevel();
Serial.print(“Light: “);
Serial.print(lux);
Serial.println(” lx”);
delay(1000);
}