Artifact Content

Artifact 2f08a4d1014e15967664f6d180b73d2490e841b4:

Wiki page [onewire] by schelte 2014-03-20 11:47:55.
D 2014-03-20T11:47:55.463
L onewire
U schelte
W 1921
<h1>The onewire command</h1>


<b>package require onewire</b>

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



The <b>onewire</b> command lets you interact with DS2482 based devices. Both the DS2482-100, driving a single 1-wire interface, and the DS2482-800 driving 8 1-wire interfaces, can be used. The legal values of <i>subcommand</i> are listed below. Note that you can abbreviate the <i>subcommand</i>s.

<dt><b>onewire ds2482</b> <i>bus</i> ?<i>number</i>?
<dd>Open a channel to a DS2482 device. There can be up to four DS2482-100 devices, or up to eight DS2482-800 devices on the same i2c bus. The <i>number</i> argument selects which of the devices to access. The command returns the channel handle.
<dt><b>onewire configure</b> <i>handle</i> ?<i>option</i> ...?
<dd>Configure the 1-wire interface options. All specified options will be enabled, while unspecified options are disabled. Valid options are:
<ul><li><b>APU</b> - Active pull-up<li><b>SPU</b> - Strong pull-up<li><b>1WS</b> - Overdrive speed</ul>
<dt><b>onewire channel</b> <i>handle</i> <i>channel</i>
<dd>Select which of the 8 1-wire channels to access. This is only applicable for DS2482-800 devices.
<dt><b>onewire inventory</b> <i>handle</i>
<dd>Find the addresses of all 1-wire devices on the 1-wire bus. The addresses are returned as a list, where each device is a list of 8 bytes expressed in decimal.
<dt><b>onewire convert</b> <i>handle</i> ?<i>device</i>?
<dd>Instruct one or all temperature sensors on the 1-wire bus to start a temperature conversion.
<dt><b>onewire temperature</b> <i>handle</i> ?<i>device</i>?
<dd>Read the result of the last temperature conversion. The <i>device</i> argument may only be omitted if there is exactly one 1-wire device connected on the bus. This command supports both DS18S20 and DS18B20 temperature sensors.

Z 3dec64a0db7d624e31f920aba52d31dd