Created
August 31, 2020 20:25
-
-
Save elizabethn119/149e4b4957f558048acda829e0ed852a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2020 Bryan Siepert, written for Adafruit Industries | |
# SPDX-License-Identifier: Unlicense | |
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment