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.18.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.18.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_bh1750-1.1.18.tar.gz
Algorithm Hash digest
SHA256 96847b1859ccc437d1e0fa5537f3d320682348d30853cfe5bbe2350739c95fe2
MD5 456230452fd1b236b16d2e2ee6f52243
BLAKE2b-256 ffeedd5ddc236e114b6be72da1b9e792d780d50a3fc80f458629fa144f040249

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_bh1750-1.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 58cbfce021657893604ff3b8b137609dc1de523b7c440d641eecaa983fe314b1
MD5 4463143ca9fb9acdf22e252a780111c5
BLAKE2b-256 dadbfa6f203df73066b82615f20561fba7ea89d9d7fe9a1b74fd359646e11b16

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