Line 12: |
Line 12: |
| </pre> | | </pre> |
| | | |
− | In order to read value use the <b><i>status</i></b> command: | + | In order to read values, use the <b><i>status</i></b> command: |
| | | |
| ubus call ioman.gpio.dio0 status | | ubus call ioman.gpio.dio0 status |
| ubus call ioman.relay.relay0 status | | ubus call ioman.relay.relay0 status |
| | | |
− | To change input settings use the <i><b>update</i></b> command and specify a value: | + | To change input settings, use the <i><b>update</i></b> command and specify a value: |
| | | |
| ubus call ioman.gpio.dio0 update '{"value":"0"}' | | ubus call ioman.gpio.dio0 update '{"value":"0"}' |
| ubus call ioman.gpio.dio0 update '{"value":"1"}' | | ubus call ioman.gpio.dio0 update '{"value":"1"}' |
| | | |
− | To change relay settings use yhr <i><b>update</i></b> command and specify a state: | + | To change relay settings, use the <i><b>update</i></b> command and specify a state: |
| | | |
| ubus call ioman.relay.relay0 update '{"state":"open"}' | | ubus call ioman.relay.relay0 update '{"state":"open"}' |
Line 43: |
Line 43: |
| iio (isolated input) input 1021 (to read value refer to gpio1021) | | iio (isolated input) input 1021 (to read value refer to gpio1021) |
| | | |
− | In order to read digital input value use the <b><i>cat</i></b> command: | + | In order to read digital input values, use the <b><i>cat</i></b> command: |
| | | |
| cat /sys/class/gpio/gpio14/value | | cat /sys/class/gpio/gpio14/value |
Line 49: |
Line 49: |
| cat /sys/class/gpio/gpio1021/value | | cat /sys/class/gpio/gpio1021/value |
| | | |
− | To change an input state usethe <b><i>echo</i></b> command (where "1" is "dry" state and "0" is "wet" state): | + | To change an input state, use the <b><i>echo</i></b> command (where "1" is "dry" state and "0" is "wet" state): |
| | | |
| echo 0 > /sys/class/gpio/gpio12/value | | echo 0 > /sys/class/gpio/gpio12/value |
| echo 1 > /sys/class/gpio/gpio38/value | | echo 1 > /sys/class/gpio/gpio38/value |
| | | |
− | When one Relay output is open, the other one is closed, so to turn an output on or off, you will have to change value on both pins: | + | When one Relay output is open, the other one is closed; so to turn an output on or off, you will have to change the value on both pins: |
| | | |
| echo 1 > /sys/class/gpio/gpio20/value & echo 0 > /sys/class/gpio/gpio22/value | | echo 1 > /sys/class/gpio/gpio20/value & echo 0 > /sys/class/gpio/gpio22/value |
Line 69: |
Line 69: |
| ====One-wire==== | | ====One-wire==== |
| ---- | | ---- |
− | To read one-wire sensor data you will need to follow these steps:
| + | In order to read one-wire sensor data you will need to follow these steps: |
| | | |
| <ol> | | <ol> |