The jeelux command
Synopsis
package require jeeluxjeelux subcommand ?arg ...?
Description
The jeelux command lets you interact with TSL2561 based devices, like the jeelabs lux plug. The legal values of subcommand are listed below. Note that you can abbreviate the subcommands.
- jeelux luxplug bus ?number?
- Open a channel to a jeelabs lux plug and power up the device. There can be a maximum of two lux plugs on the same i2c bus. The number argument selects which of the two devices to access. The command returns the channel handle.
- jeelux close handle
- Close the channel to a jeelabs lux plug. Contrary to the regular Tcl close command, this will also power down the device.
- jeelux id handle
- Read the product ID of the device.
- jeelux power handle power
- Switch the device on or off.
- jeelux timing handle ?timing? ?gain?
- Configure the timing and gain used during a measurement. Valid values for timing are short (13.7ms), medium (101ms), long (402ms), and start or stop to use "manual" timing. Valid values for gain are 1x and 16x. The gain argument may also be specified as a boolean. In that case false means 1x gain and a true means 16x gain.
- jeelux channel handle channel
- Read the individual light value of the specified channel. There are two channels available: Channel 0 for visable and IR light, and channel 1 for IR only. Comparing the two can give an indication of whether the light source is natural or artificial.
- jeelux lux handle
- Read the light level expressed in lux.