Skip to content

SL01 Module

This is a Module for the SL01 UVA, UVB, UV Index and luminosity sensor. The xChip is based on the VEML6075 UVA and UVB Light Sensor and the TSL4531 digital ambient light sensor. The board uses I2C for communication.

Data Sheets:

VEML6075 class

class VEML6075

class VEML6075(self, drvname, addr=0x10, clk=100000)

Create an instance of the VEML6075 class.

Arguments:

  • drvname – I2C Bus used ‘( I2C0, … )’
  • addr – Slave address, default 0x10
  • clk – Clock speed, default 100kHz
VEML6075.init

init()

Configure registers of VEML6075 for UV measurements. Call after instantiating VEML6075 class. Exception raised if unsuccessful.

VEML6075.getUVA

getUVA()

Reads the UVA value and returns it.

Return the real UVA value as a float data type.

VEML6075.getUVB

getUVB()

Reads the UVB value and returns it.

Return the real UVB value as a float data type.

VEML6075.getUVIndex

getUVIndex()

Reads the UV Index value and returns it.

Return the real UV index as a float.

TSL4531 class

class TSL4531

class TSL4531(self, drvname, addr=0x29, clk=100000)

Create an instance of the TSL4531 class.

Arguments:

  • drvname – I2C Bus used ‘( I2C0, … )’
  • addr – Slave address, default 0x29
  • clk – Clock speed, default 100kHz
TSL4531.init

init()

Configure registers of TSL4531 for light measurement. Call after instantiating TSL4531 class. Exception raised if unsuccessful.

TSL4531.getLUX

getLUX()

Reads the luminosity value and returns it in LUX.

Return the LUX value as a float.