Wiring up WINGONEER GY-30 BH1750FVI Digital Light Sensor

The Wingoneer digital light sensor is a great way to measure ambient light levels. This project will show you how to connect the light sensor to your raspberry pi and start reading the light intensity around it. I have used this sensor to monitor plants in and outside of my home to make sure they are getting enough light. If your pi is new and fresh out of the box, follow my Quick setup guide

What you will need

Step one: Wire the connections

  • Following the wiring diagram above, make all the connections between the pi and your digital light sensor:
  • 1) VCC connects to power (either 3.3V or 5.5V will work)
  • 2) SCL connects to the raspberry pi's I2c SCL
  • 3) SDA connects to the pi's I2c SDA
  • 4) GND, ADD both connect to ground

Step two: Configure I2C Interface

  • cd ~
  • 1) sudo raspi-config
  • 1a) Select "Interfacing Options"
  • 1b) Select "I2C"
  • 1c) Select Yes / OK / Finish to enable the interface
  • 2) sudo apt-get update
  • 3) sudo apt-get install -y python-smbus i2c-tools
  • 4) reboot the raspberry pi

Step three: Download example code and test your sensor!

  • wget http://www.thispi.com/downloads/bh1750fvi-sensor.py
  • Then run the script: python bh1750fvi-sensor.py
  • Depending on the light around your sensor, you should see output similar to: Light Level : 70.8333333333