adafruit_tsl2561

CircuitPython driver for TSL2561 Light Sensor.

  • Author(s): Carter Nelson

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_tsl2561.TSL2561(i2c: I2C, address: int = 57)[source]

Class which provides interface to TSL2561 light sensor.

property broadband: int

The broadband channel value.

property chip_id: Tuple[int, int]

A tuple containing the part number and the revision number.

clear_interrupt() None[source]

Clears any pending interrupt.

property cycles: int

The number of integration cycles for which an out of bounds value must persist to cause an interrupt.

property enabled: bool

The state of the sensor.

property gain: int

The gain. 0:1x, 1:16x.

property infrared: int

The infrared channel value.

property integration_time: int

The integration time. 0:13.7ms, 1:101ms, 2:402ms, or 3:manual

property interrupt_mode: int

The interrupt mode selection.

Mode

Description

0

Interrupt output disabled

1

Level Interrupt

2

SMBAlert compliant

3

Test Mode

property luminosity: Tuple[int, int]

The overall luminosity as a tuple containing the broadband channel and the infrared channel value.

property lux: float | None

The computed lux value or None when value is not computable.

property threshold_high: int

The upper light interrupt threshold level.

property threshold_low: int

The low light interrupt threshold level.