This is an old revision of the document!
WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0
Read the next device from a onewire bus.
none
An array of 8 elements containing the unique onewire address. Returns 0 if no more devices were detected
<pre><? $arr=ow_first(); if ($arr) { // first device was detected, let's get the second device now $arr=ow_next(); if ($arr) { $devname=sprintf("%02X%02X%02X%02X%02X%02X%02X%02X",$arr[0],$arr[1],$arr[2],$arr[3],$arr[4],$arr[5],$arr[6],$arr[7]); print("Detected second Onewire device ".$devname); } } else print("No devices detected."); ?>
ow_first() - Get the first device on the bus
ow_read() - Read from onewire bus
ow_read_temp() - Read a temperature from a device
ow_reset() - Reset the onewire bus
ow_write() - Write to onewire bus