Arduino
Using the BH1750 with Arduino is a simple matter of wiring up the sensor to your Arduino-compatible
microcontroller, installing the hp_BH1750 (https://adafru.it/MfD) library written by Stefan
Armborst (https://adafru.it/MfE), and running one of many very well written examples. Usually we write our
own library but we were so impressed by Stefan's that we didn't think we could possibly improve on it, so
use it!
I2C Wiring
Use this wiring if you want to connect via I2C interface. The I2C address address for the BH1750 is 0x23
and can be switched to 0x5C by pulling the address pin high to VCC
Here is how to wire up the sensor using one of the STEMMA QT (https://adafru.it/Ft4) connectors. The
examples show a Metro but wiring will work the same for an Arduino or other compatible board.
Connect board VIN (red wire) to Arduino 5V if you
are running a 5V board Arduino (Uno, etc.). If your
board is 3V, connect to that instead.
Connect board GND (black wire) to Arduino GND
Connect board SCL (yellow wire) to Arduino SCL
Connect board SDA (blue wire) to Arduino SDA
Here is how to wire the sensor to a board using a solderless breadboard:
Connect board VIN (red wire) to Arduino 5V if you
are running a 5V board Arduino (Uno, etc.). If your
board is 3V, connect to that instead.
Connect board GND (black wire) to Arduino GND
Connect board SCL (yellow wire) to Arduino SCL
Connect board SDA (blue wire) to Arduino SDA
Library Installation