Close
0%
0%

Integrate BH1750 Ambient Light Sensor with Arduino

Many display devices nowadays have Ambient Light sensors to adjust the brightness automatically. Let's see how we integrate it with Arduino

Similar projects worth following
In this project, we are combining the light sensor and Arduino which can auto-adjust the brightness of the display in various modules.

About Project

Basically BH1750 is a Digital Ambient Light Sensor or we can call it as Light Intensity Sensor, which can be utilized to auto adjust the brightness of the display in mobiles, LCD displays, or turn on/off the headlights in cars depends on the external lighting conditions.

The sensor utilizes I2C serial communication protocol which does it simpler to use with microcontrollers. For I2C communication it has SDI as well as SDA pins.

The output of this sensor is in LUX, so it will not need any calculations.

As we know Lux is the unit to estimate Light intensity. It calculates the intensity as per the amount of light hitting on a specific area. This sensor can also operate individually without any external component.

  • 1 × Arduino Uno
  • 1 × BH1750 Ambient Light Sensor
  • 1 × 16X2 LCD Display
  • 1 × Connecting wires

  • 1
    Run a Program
    #include #include

    int BH1750address = 0x23;
    byte buff[2];
    LiquidCrystal lcd (7,6,5,4,3,2); //RS, E, D4, D5, D6, D7

    void setup()
    {
    Wire.begin();
    //Serial.begin(9600);
    lcd.begin(16,2);
    lcd.print(" BH1750 Light ");
    lcd.setCursor(0,1);
    lcd.print("Intensity Sensor");
    delay(2000);
    }

    void loop()
    {
    int i;
    uint16_t value=0;
    BH1750_Init(BH1750address);
    delay(200);

    if(2==BH1750_Read(BH1750address))
    {
    value=((buff[0]<

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates