afsh_ad
Published © GPL3+

Measure LUX with Arduino Using BH1750

Measure your light intensity lux using this sensor and simple code.

BeginnerFull instructions provided20,497
Measure LUX with Arduino Using BH1750

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Adafruit bh1750 lux sensor
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Custom parts and enclosures

bh1750-master_IkmI0RZbUo.zip

Schematics

lux_qo4Ni002ya.jpg

connections

Code

code

C/C++
#include <Wire.h>
#include <BH1750.h>
 
 
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);
}

Credits

afsh_ad

afsh_ad

0 projects • 10 followers

Comments