This shows you the differences between two versions of the page.
uphp:functions:ow_first [2017/05/11 23:30] jeff |
uphp:functions:ow_first [2021/09/13 05:57] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======ow_first====== | ||
- | |||
- | < | ||
- | |||
- | Initiate a OneWire bus scan and return the address of the first device found | ||
- | |||
- | ====Description==== | ||
- | |||
- | <well size=" | ||
- | <span style=" | ||
- | <span style=" | ||
- | </ | ||
- | |||
- | This function starts a new OneWire bus scan and provides the address of the first device found. | ||
- | |||
- | ====Parameters==== | ||
- | |||
- | None | ||
- | |||
- | ====Return Values==== | ||
- | |||
- | An < | ||
- | |||
- | ====Example==== | ||
- | |||
- | <code php> | ||
- | <? | ||
- | $arr=ow_first(); | ||
- | if ($arr) { | ||
- | $devname=sprintf(" | ||
- | print(" | ||
- | } else { | ||
- | print(" | ||
- | } | ||
- | ?> | ||
- | </ | ||
- | |||
- | ====See Also==== | ||
- | |||
- | [[ow_next()]] - Return the address of the next OneWire device found (after an ow_first) | ||
- | |||
- | [[ow_read()]] - Read a byte from the OneWire bus | ||
- | |||
- | [[ow_read_temp()]] - Read a temperature from a device on the OneWire bus | ||
- | |||
- | [[ow_reset()]] - Reset the OneWire bus | ||
- | |||
- | [[ow_write()]] - Write a byte to the OneWire bus | ||