Changes

Created page with "You can control and monitor input and output values via a command line interface (CLI) with the <i>gpio.sh</i> command. You can execute this comman..."
You can control and monitor input and output values via a [[Command line interfaces|command line interface (CLI)]] with the <i>gpio.sh</i> command. You can execute this command without any additional options to get usage syntax examples:

<pre>
root@Teltonika:~# gpio.sh
GPIO control aplication
Usage: /sbin/gpio.sh <ACTION> <NAME>
ACTION - set, clear, get, export, invert, dirout, dirin
NAME - SIM MON MRST SDCS CASE DIN1 DOUT1

</pre>

Where:

<ul>
<li><b>DIN1''' - Digital input</li>
<li><b>DOUT1''' - Digital output</li>
</ul>
----
For example, to get the status of the digital output use the following command:

<pre>
root@Teltonika:~# gpio.sh get DOUT1
0
</pre>

The return value <b>0</b> means that the output is in <b>Inactive</b> (<b>Low level</b>), i.e., <b>OFF</b>. You can turn it <b>ON</b> (<b>Active</b> (<b>High level</b>)) by setting its value to <b>1</b>:

<pre>
root@Teltonika:~# gpio.sh invert DOUT1
root@Teltonika:~# gpio.sh get DOUT1
1
</pre>

As seen in the example above, you can change the value of an output by using the <i>invert</i> command, which simply turns the current value of the specified output and turns it into its opposite state.