Загрузка...

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

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/documentation/computers/configuration.html

Tutorial: https://anavi.org/article/269/
GitHub repository: https://github.com/AnaviTechnology/anavi-examples/
Source code: https://github.com/AnaviTechnology/anavi-examples/tree/master/sensors/BH1750/python

Видео Measuring Light with Python, Linux, BH1750 Ambient Light Sensor and Raspberry Pi канала Leon Anavi
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять