Artifact Content

Artifact f8a5f96ad2953820344b7069cd8c2226b5533fda:

Wiki page [jeelux] by schelte 2014-03-20 11:01:43.
D 2014-03-20T11:01:43.226
L jeelux
U schelte
W 1325
<h1>The jeelux command</h1>


<b>package require jeelux</b>

<b>jeelux</b> <i>subcommand</i> ?<i>arg ...</i>?



The <b>jeelux</b> command lets you interact with TSL2561 based devices, like the jeelabs lux plug. The legal values of <i>subcommand</i> are listed below. Note that you can abbreviate the <i>subcommand</i>s.

<dt><b>jeelux luxplug</b> <i>bus</i> ?<i>number</i>?
<dd>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 <i>number</i> argument selects which of the two devices to access. The command returns the channel handle.
<dt><b>jeelux close</b> <i>handle</i>
<dd>Close the channel to a jeelabs lux plug. Contrary to the regular Tcl close command, this will also power down the device.
<dt><b>jeelux id</b> <i>handle</i>
<dd>Read the product ID of the device
<dt><b>jeelux channel</b> <i>handle</i> <i>channel</i>
<dd>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.
<dt><b>jeelux lux</b> <i>handle</i>
<dd>Read the light level expressed in lux.

Z 035163b6da33c29bc3c6392c9af3169e