Measuring Light with Python, Linux, BH1750 Ambient Light Sensor and Raspberry Pi

Leon Anavi
Leon Anavi
2 هزار بار بازدید - 10 ماه پیش - This video is sponsored by
This video is sponsored by PCBWay. Only $5 for 10 PCBs and Only $4.98 for 3D Printing + Express 24 hour service on http://www.pcbway.com/ BH1750 is an low-cost ambient light sensor which can be attached to Raspberry Pi, Arduino, ESP32 and many other development boards. This step-by-step tutorial demonstrates how to use BH1750 to measure light in lux using a Python 3 script on Raspberry Pi and to show the value on a mini OLED yellow-blue display. Both BH1750 and the mini OLED display are connected to the Raspberry Pi using the widely used bus communication protocol I2C.

Note: It is mandatory to enable I2C on Raspberry Pi OS. You can do it using the command-line tool rpi-config as per the user's documentation: https://www.raspberrypi.com/documenta...

Tutorial: https://anavi.org/article/269/
GitHub repository: https://github.com/AnaviTechnology/an...
Source code: https://github.com/AnaviTechnology/an...
10 ماه پیش در تاریخ 1402/07/03 منتشر شده است.
2,004 بـار بازدید شده
... بیشتر