itsl.py 225 B

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