rasolar/itsl.py

7 lines
225 B
Python
Raw Permalink Normal View History

2019-06-08 07:10:39 -07:00
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