> For the complete documentation index, see [llms.txt](https://learn.breadstick.ca/breadstick/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.breadstick.ca/breadstick/breadsticks/support-boards/i2c-devices/brightness-crouton.md).

# Brightness Crouton

{% tabs %}
{% tab title="Front" %}

<figure><img src="/files/nP3nr1EH0nZVRokp5PmJ" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Back" %}

<figure><img src="/files/WAPfgmNtXqpm13iKH7dc" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Product Page

<https://shop.breadstick.ca/products/brightness-crouton>

## Circuit Python Library

<https://github.com/adafruit/Adafruit_CircuitPython_BH1750>

## BH1750 Datasheet

<https://www.mouser.ca/datasheet/2/348/Rohm_11162017_ROHMS34826-1-1279292.pdf>

## Code

```python
"""
Brightness Crouton (BH1750) Demo Code
Breadstick Innovations
April 16, 2024
https://learn.breadstick.ca/breadstick/breadsticks/support-boards/i2c-devices/brightness-crouton
"""

import board
import time
import adafruit_bh1750


crouton_i2c = board.I2C()  # Default Breadstick I2C pins D11(SCL) & D12(SDA)
bh1750 = adafruit_bh1750.BH1750(crouton_i2c)


while True:

    brightness = bh1750.lux

    plotter_data = (brightness,)  # Mu's Plotter only displays tuples, this is a single object tuple
    print(plotter_data)
    
    print(f'Brightness: {brightness} lux')
    print("")

    time.sleep(0.1)
```
