Changes

no edit summary
Line 73: Line 73:     
[[File:Networking trb141 configuration 1 wire cli v1.png|border|class=tlt-border|1100px]]
 
[[File:Networking trb141 configuration 1 wire cli v1.png|border|class=tlt-border|1100px]]
 +
 +
===1-Wire activation commands===
 +
 +
In order to read one-wire sensor data you will need to follow these steps:
 +
 +
<ol>
 +
    <li>Set one-wire sensor value to "1' using the <i>ubus</i> command: <pre>ubus call ioman.gpio.onewire update '{"value":"1"}'</pre></li>
 +
    <li>List the connected one-wire devices from the <i>/sys/bus/w1/devices</i> directory using the <b><i>ls</i></b> command: <pre>ls /sys/bus/w1/devices</pre></li>
 +
    <li>Choose a sensor to read and obtain its state from the <i>/sys/bus/w1/devices/&#60;device_name&#62;/w1_slave</i> directory: <pre>cat /sys/bus/w1/devices/&#60;device_name&#62;/w1_slave</pre></li>
 +
</ol>

Navigation menu