Skip to content

TSL2561 — Luminosity

I2C address 0x39. Returns full-spectrum, IR, and visible (full − IR) counts.

Connect and read

from eyes17 import eyes
from eyes17.SENSORS import TSL2561

p = eyes.open()
s = TSL2561.connect(p.I2C)
full, ir, visible = s.getRaw()
print(full, ir, visible)

Configuration

Method Options
setGain(gain) '1x' or '16x'
setTiming(timing) 0 → 13 ms, 1 → 101 ms, 2 → 402 ms
enable() / disable() power on/off
s.setGain('16x')
s.setTiming(1)   # 101 ms integration
print(s.getRaw())

Project example: Malus law.