]>
zdv2.bktei.com Git - EVA-2020-02-2.git/blob - examples/light.py
   8     format
='%(asctime)s.%(msecs)03d %(levelname)-8s %(message)s', 
  10     datefmt
='%Y-%m-%d %H:%M:%S') 
  12 logging
.info("""light.py - Print readings from the LTR559 Light & Proximity sensor. 
  20         lux 
= ltr559
.get_lux() 
  21         prox 
= ltr559
.get_proximity() 
  22         logging
.info("""Light: {:05.02f} Lux 
  24 """.format(lux
, prox
)) 
  26 except KeyboardInterrupt: