Skip to main content

CircuitPython library for use with the Adafruit BH1750 breakout

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

CircuitPython library for use with the Adafruit BH1750 Ambient Light Sensor Breakout

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-bh1750

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-bh1750

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-bh1750

Usage Example

import time
import board
import adafruit_bh1750

i2c = board.I2C()
sensor = adafruit_bh1750.BH1750(i2c)

while True:
    print("%.2f Lux"%sensor.lux)
    time.sleep(1)

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_bh1750-1.1.19.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file adafruit_circuitpython_bh1750-1.1.19.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_bh1750-1.1.19.tar.gz
Algorithm Hash digest
SHA256 99d66de9dfedc2dfce122996d806105862dc8cbca55258fa8026b967959f877c
MD5 355d4bf71675b2a32ed34b7274909027
BLAKE2b-256 89120a929fe31b6c29445b29faa1b623b84c32367cc19fd1e982fc9edc74c4ee

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_bh1750-1.1.19-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_bh1750-1.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 2662ec1fbf1a2e62cc3ddae15d868bdcc567f24526dc7c59724f9b77c31237ee
MD5 65ab63a98e7e81a313ea1028fff63b54
BLAKE2b-256 ae2de5f884f91225a342468014060c6b1afcd4035abf0692c7fe3fcf6cd17107

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page