rasolar/itsl.py

7 lines
225 B
Python

import tsl2591
tsl = tsl2591.Tsl2591() # initialize
full, ir = tsl.get_full_luminosity() # read raw values (full spectrum and ir spectrum)
lux = tsl.calculate_lux(full, ir) # convert raw values to lux
print lux, full, ir