adafruit_veml6075

CircuitPython library to support VEML6075 UVA & UVB sensor.

  • Author(s): ladyada

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_veml6075.VEML6075(i2c_bus: I2C, *, integration_time: int = 50, high_dynamic: bool = True, uva_a_coef: float = 2.22, uva_b_coef: float = 1.33, uvb_c_coef: float = 2.95, uvb_d_coef: float = 1.74, uva_response: float = 0.001461, uvb_response: float = 0.002591)

Driver base for the VEML6075 UV Light Sensor

Parameters:
  • i2c_bus – The busio.I2C object to use. This is the only required parameter.

  • integration_time (int) – The integration time you’d like to set initially. Available options - each in milliseconds: 50, 100, 200, 400, 800. The higher the ‘_x_’ value, the more accurate the reading is (at the cost of less samples per reading). Defaults to 100ms if parameter not passed. To change setting after intialization, use [veml6075].integration_time = new_it_value.

  • high_dynamic (bool) – whether to put sensor in ‘high dynamic setting’ mode

  • uva_a_coef (float) – the UVA visible coefficient

  • uva_b_coef (float) – the UVA IR coefficient

  • uvb_c_coef (float) – the UVB visible coefficient

  • uvb_d_coef (float) – the UVB IR coefficient

  • uva_response (float) – the UVA responsivity

  • uvb_response (float) – the UVA responsivity

property integration_time: int

The amount of time the VEML is sampling data for, in millis. Valid times are 50, 100, 200, 400 or 800ms

property uv_index: float

The calculated UV Index

property uva: float

The calibrated UVA reading, in ‘counts’ over the sample period

property uvb: float

The calibrated UVB reading, in ‘counts’ over the sample period