Features
- I2C Protocol Interface: Simple and fast two-wire communication
- Ambient Light to Digital Converter: Direct digital output of light intensity
- High Resolution: Measures light levels from 1 to 65535 lux
- Low Power Consumption: Includes power-saving mode
- Noise Rejection: Reduces 50Hz/60Hz light noise effectively
- 1.8V Logic Compatible: Works with lower voltage logic systems
- No External Components Needed: Simplifies circuit design
- Minimal Light Source Dependency: Stable readings under different lighting
- Multiple I2C Addresses: Supports 0x23 and 0x5C
- Small Measurement Variation: Accuracy within ±20%
- Low Infrared Influence: IR light minimally affects readings
Specifications
- Supply Voltage: 3.3V to 5V
- Measurement Range: 1 to 65535 lx
- Interface: I2C (SDA, SCL)
- Power Consumption: 0.12mA (typical)
- Logic Level: 1.8V Compatible
- Measurement Accuracy: ±20%
- Two I2C Addresses: 0x23 (ADDR = LOW) or 0x5C (ADDR = HIGH)
- Dimensions: 18mm x 14mm
Pinout Configuration

Pin |
Description |
ADDR |
I2C Device Address Selection: 0x23 (LOW) or 0x5C (HIGH) |
SDA |
I2C Data Line |
SCL |
I2C Clock Line |
GND |
Ground |
VCC |
3.3V to 5V Power Supply |
Library Download
To use the BH1750 with Arduino, install its library from the Arduino Library Manager or GitHub.
Download BH1750 Library
Wiring Connections with Arduino
BH1750 Pin |
Arduino Pin |
VCC |
3.3V or 5V |
GND |
GND |
SDA |
A4 (default I2C SDA) |
SCL |
A5 (default I2C SCL) |
Check your specific Arduino board’s I2C pins if different.
Wiring Diagram

Arduino Code for BH1750 GY-302 Light Sensor
#include "Wire.h"
#include "BH1750.h"
BH1750 lightMeter;
void setup() {
Serial.begin(9600);
Wire.begin();
lightMeter.begin();
}
void loop() {
uint16_t lux = lightMeter.readLightLevel();
Serial.print("Light Level: ");
Serial.print(lux);
Serial.println(" lx");
delay(1000);
}
How This Code Works:
Wire.begin()
initializes I2C communication.
lightMeter.begin()
starts the BH1750 sensor.
readLightLevel()
reads ambient light intensity in lux.
- Sensor readings are printed every second to the Serial Monitor.
Features
- I2C Protocol Interface: Simple and fast two-wire communication
- Ambient Light to Digital Converter: Direct digital output of light intensity
- High Resolution: Measures light levels from 1 to 65535 lux
- Low Power Consumption: Includes power-saving mode
- Noise Rejection: Reduces 50Hz/60Hz light noise effectively
- 1.8V Logic Compatible: Works with lower voltage logic systems
- No External Components Needed: Simplifies circuit design
- Minimal Light Source Dependency: Stable readings under different lighting
- Multiple I2C Addresses: Supports 0x23 and 0x5C
- Small Measurement Variation: Accuracy within ±20%
- Low Infrared Influence: IR light minimally affects readings
Specifications
- Supply Voltage: 3.3V to 5V
- Measurement Range: 1 to 65535 lx
- Interface: I2C (SDA, SCL)
- Power Consumption: 0.12mA (typical)
- Logic Level: 1.8V Compatible
- Measurement Accuracy: ±20%
- Two I2C Addresses: 0x23 (ADDR = LOW) or 0x5C (ADDR = HIGH)
- Dimensions: 18mm x 14mm
Pinout Configuration

Pin |
Description |
ADDR |
I2C Device Address Selection: 0x23 (LOW) or 0x5C (HIGH) |
SDA |
I2C Data Line |
SCL |
I2C Clock Line |
GND |
Ground |
VCC |
3.3V to 5V Power Supply |
Library Download
To use the BH1750 with Arduino, install its library from the Arduino Library Manager or GitHub.
Download BH1750 Library
Wiring Connections with Arduino
BH1750 Pin |
Arduino Pin |
VCC |
3.3V or 5V |
GND |
GND |
SDA |
A4 (default I2C SDA) |
SCL |
A5 (default I2C SCL) |
Check your specific Arduino board’s I2C pins if different.
Wiring Diagram

Arduino Code for BH1750 GY-302 Light Sensor
#include "Wire.h"
#include "BH1750.h"
BH1750 lightMeter;
void setup() {
Serial.begin(9600);
Wire.begin();
lightMeter.begin();
}
void loop() {
uint16_t lux = lightMeter.readLightLevel();
Serial.print("Light Level: ");
Serial.print(lux);
Serial.println(" lx");
delay(1000);
}
How This Code Works:
Wire.begin()
initializes I2C communication.
lightMeter.begin()
starts the BH1750 sensor.
readLightLevel()
reads ambient light intensity in lux.
- Sensor readings are printed every second to the Serial Monitor.