LIGHT INTENSITY BY BH1750

BH1750

The code can be downloaded at:

https://github.com/triantara/ARDUINO-TRIANTARA/blob/main/LIGHT%20INTENSITY%20BH1750.zip

#include <Wire.h>
#include <BH1750.h>
BH1750 lightMeter;
void setup(){
Serial.begin(9600);
lightMeter.begin();
}
void loop() {
uint16_t lux = lightMeter.readLightLevel();
Serial.print(“Light: “);
Serial.print(lux);
Serial.println(” lx”);
delay(100);
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s