Light Sensor (SKU:SEN0097)
Editing Light Sensor
Contents
1 Introduction
1.1 Specification
2 Wiring Diagram
3 Sample Code
Introduction
This is a BH1750 light intensity sensor breakout board with a 16 bit AD converter built-in which can
directly output a digital signal, there is no need for complicated calculations. This is a more acurate
and easier to use version of the simple foto resistor which only outputs a voltage that needs to be
calculated in order to obtain meaningful data. With the BH1750 Light Sensor intensity can be directly
measured by the luxmeter, without needing to make calculations. The data which is output by this
sensor is directly output in Lux (Lx). When objects which are lighted in homogeneous get the 1 lx
luminous flux in one square meter ,their light intensity is 1lx. Sometimes to take good advantage of
the illuminant, you can add a reflector to the illuminant.So that there will be more luminous flux in
some directions and it can increase the ilumination of the target surface.
For example:
Night: 0.001--0.02;
moonlightnight:0.02--0.3;
cloudy indoor:5--50;
cloudy outdoor:50--500;
Sunny indoor:100--1000;
under the sunlight in summer afternoon: about 10*6 power;
reading books for intensity of illumination:50--60;
home video standard intensity of illumination:1400.
Specification
power supply voltage: +3 to 5Vdc
Interface: I2C
Wide range and High resolution. ( 1 - 65535 lx )
It is possible to select 2 types of I2C slave-address.
Small measurement variation (+/- 20%)
Size: 0.85*0.63*0.13"(21*16*3.3mm)
Wiring Diagram
Light Sensor Wiring diagram
Please note that the "add" Pin is to assign a different I2C address to the sensor. For our sample
code this pin is not used. For more information about I2C protocol, go to Wikipedia I2C
Sample Code
/*
Sample code for the BH1750 Light sensor
Version 0.1
website:www.DFRobot.com
Connection:
VCC-5v
GND-GND
SCL-SCL(analog pin 5)
SDA-SDA(analog pin 4)
ADD-NC
*/
#include //BH1750 IIC Mode
#include
int BH1750address = 0x23; //setting i2c address
byte buff[2];
void setup()
{
Wire.begin();
Serial.begin(57600);//init Serail band rate
}
void loop()
{
int i;
uint16_t val=0;
BH1750_Init(BH1750address);
delay(200);
if(2==BH1750_Read(BH1750address))
{
val=((buff[0]
很抱歉,暂时无法提供与“SEN0097”相匹配的价格&库存,您可以联系我们找货
免费人工找货- 国内价格
- 1+66.71746
- 2+59.21923
- 3+58.87187
- 6+55.99715
- 国内价格 香港价格
- 1+68.412731+8.21510
- 3+60.319893+7.24330