Reads sensor values from the device and returns calculated lux value.
#### Syntax
`tsl2561.getlux()`
#### Parameters
none
#### Returns
-`lux` the calculated illuminance in lux (lx)
-`status` value indicating success or failure as explained below:
*`tsl2561.TSL2561_OK`
*`tsl2561.TSL2561_ERROR_I2CINIT` can't initialize I2C bus
*`tsl2561.TSL2561_ERROR_I2CBUSY` I2C bus busy
*`tsl2561.TSL2561_ERROR_NOINIT` initialize I2C bus before calling function
*`tsl2561.TSL2561_ERROR_LAST`
#### Example
``` lua
status = tsl2561.init(5, 6, tsl2561.ADDRESS_FLOAT, tsl2561.PACKAGE_T_FN_CL)
if status == tsl2561.TSL2561_OK then
lux = tsl2561.getlux()
print("Illuminance: "..lux.." lx")
end
```
## tsl2561.getrawchannels()
Reads the device's 2 sensors and returns their values.
#### Syntax
`tsl2561.getrawchannels()`
#### Parameters
none
#### Returns
-`ch0` value of the broad spectrum sensor
-`ch1` value of the IR sensor
-`status` value indicating success or failure as explained below:
*`tsl2561.TSL2561_OK`
*`tsl2561.TSL2561_ERROR_I2CINIT` can't initialize I2C bus
*`tsl2561.TSL2561_ERROR_I2CBUSY` I2C bus busy
*`tsl2561.TSL2561_ERROR_NOINIT` initialize I2C bus before calling function
*`tsl2561.TSL2561_ERROR_LAST`
#### Example
``` lua
status = tsl2561.init(5, 6, tsl2561.ADDRESS_FLOAT, tsl2561.PACKAGE_T_FN_CL)
if status == tsl2561.TSL2561_OK then
ch0, ch1 = tsl2561.getrawchannels()
print("Raw values: "..ch0, ch1)
lux = tsl2561.getlux()
print("Illuminance: "..lux.." lx")
end
```
## tsl2561.init()
Initializes the device on pins sdapin & sclpin. Optionally also configures the devices address and package. Default: address pin floating (0x39) and FN package.