Light
Interfacing BH1750 Light with Arduino Uno
What is the BH1750?
The BH1750 is a 16-bit digital ambient light sensor that talks over I2C and returns a lux value directly — no ADC, no voltage divider, and no manual calibration curve like a raw LDR needs. Internally it uses a photodiode plus an integrating ADC and outputs a number already scaled to real-world lux.
It's the sensor to reach for whenever a project needs an actual lux measurement rather than a rough "bright vs dark" signal — automatic display brightness, greenhouse light logging, or camera exposure decisions. The catch that trips people up is the ADDR pin: leaving it floating gives unpredictable address behavior, so it should always be tied firmly to GND (address 0x23) or VCC (address 0x5C), especially useful when running two BH1750s on the same bus.
Specifications
| Interface | I2C, up to 400kHz |
| I2C address | 0x23 (ADDR to GND) or 0x5C (ADDR to VCC) |
| Operating voltage | 2.4–3.6V (many breakout boards add a regulator for 5V tolerance — check yours) |
| Measurement range | 1–65535 lux, direct digital output |
| Resolution | 1 lux (standard mode), 0.5 lux (high-resolution mode 2) |
| Measurement modes | Continuous or one-time, selectable resolution mode |
| Conversion time | ~120ms (high-res mode), ~16ms (low-res mode) |
| Current draw | ~120µA active, ~1µA power-down |
BH1750 Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power, 2.4–3.6V (check breakout for 5V tolerance) |
| 2 | GND | Ground |
| 3 | SCL | I2C clock |
| 4 | SDA | I2C data |
| 5 | ADDR | Address select — tie to GND for 0x23, or VCC for 0x5C. Never leave floating. |
Always tie ADDR to a defined level (GND or VCC) rather than leaving it floating — a floating ADDR pin can cause an unreliable or wrong I2C address at power-up.
Setting Up BH1750 with Arduino Uno
Library
BH1750 by Christopher Laws
Arduino IDE → Library Manager → search "BH1750"
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V (if module has onboard regulator) or 3.3V | — |
| GND | GND | — |
| SCL | A5 | — |
| SDA | A4 | — |
| ADDR | GND (sets address to 0x23) | — |
Example code
Default library address is 0x23 — matches ADDR tied to GND.
Related Guides & Projects

Arduino Uno R3 Pinout: Every Pin Explained (Digital, Analog, PWM, Power)
Complete Arduino Uno R3 pinout reference: all 14 digital pins, 6 analog inputs, PWM, UART, SPI, I2C, AREF, and power rails explained with wiring tips and common mistakes.

Ultimate Arduino Mega 2560 Pinout Guide: Complete Power & I/O Reference
Master the Arduino Mega 2560 pinout. Detailed reference for all 54 digital pins, 16 analog inputs, PWM, UARTs, SPI, I2C, interrupts, and power. Includes a printable table and practical wiring tips.

Interfacing HC-SR04 Ultrasonic Sensor with Arduino
Measure distance accurately using ultrasonic sound waves and an Arduino Uno — no complex math, no expensive hardware.
HC‑SR04 Ultrasound Distance Measurement with Arduino – Parking Alert (LCD & Buzzer)
Learn HC‑SR04 ultrasound distance measurement with Arduino Uno. Build a parking alert system with 16x2 LCD and buzzer – shows distance and beeps faster as you approach.