Measure Light Intensity

By Emir

Reading intensity of light can be really helpful when you want to grow your own vegetables and herbs, but it can also be used in creating your own, fun morning alarm solution.

To learn how to setup and get everything functioning altogether, check out this super fun and easy tutorial!

Step 1

Bill of materials

  • Arduino board with USB cable (we use Arduino Uno)
  • BH1750 Digital Light Sensor
  • 4 pcs male to female wires
Step 2

Connect wires on sensor module

Connect four female pins of wires with relay module male pins as on picture.

Gnd - purple; SDA - blue; SCL - green; Vcc - yellow.

show more
Step 3

Connect module with Arduino

Lux module uses a special protocol for communication with Arduino, called I2C.

For I2C communication Arduino board uses special pins. For each Arduino board it is different.

Arduino UNO uses pins A4 for SDA and A5 for SCL.

Connect male wires on Arduino board:

A4 - green; A5 - blue; 5V - yellow; GND - purple;

Step 4

Download and install library

To use Lux module you need appropriate library to read sensor data.

Download one here.

Install the library (follow instructions in Read-me file).

Open Arduino IDE and check that it's in a new library added to "File"->"Sketchbook"->"libraries"->"BH1750-master".

Step 5

Open Example code

Open example code for DHT library by clicking on "File"->"Examples"->"BH1750-master"->"BH1750test".

Step 7

Read data in Serial Monitor

After upload is done successfully, open Serial Monitor to read data from Arduino on your screen.

Serial Monitor is located in Tools menu of Arduino IDE.

Tutorial Forum

There are no posts here yet. Add the first post