A python library for accessing the VEML6070 digital UV light sensor from Vishay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
498B

  1. #!/usr/bin/env python
  2. import veml6070
  3. if __name__ == '__main__':
  4. veml = veml6070.Veml6070()
  5. for i in [veml6070.INTEGRATIONTIME_1_2T,
  6. veml6070.INTEGRATIONTIME_1T,
  7. veml6070.INTEGRATIONTIME_2T,
  8. veml6070.INTEGRATIONTIME_4T]:
  9. veml.set_integration_time(i)
  10. uv_raw = veml.get_uva_light_intensity_raw()
  11. uv = veml.get_uva_light_intensity()
  12. print "Integration Time setting %d: %f W/(m*m) from raw value %d" % (i, uv, uv_raw)