![Digi TransPort WR31 User Manual Download Page 9](http://html.mh-extra.com/html/digi/transport-wr31/transport-wr31_user-manual_2496495009.webp)
Additional information
TransPort WR31 Analog and Digital Input/Output Interface User Guide
9
Configure the I/O interface
To configure the TransPort WR31 I/O interface, use the command line interface (CLI) commands. You can build these
commands into Python or Basic scripts to automate functionality, or use them manually in the CLI.
The
GPIO
command is the main command for the TransPort WR31 I/O interface. The following table summarizes
GPIO use.
The following shows CLI dialog examples of the analog input commands. User input is
bold
and device response is
plain text
.
ss460140>
gpio ain current
A0: voltage=0.7420 V
OK
ss460140>
gpio ain voltage
A0: current=1.7051 mA
OK
The following shows CLI dialog examples of the digital input commands. User input is
bold
and device response is
plain text
.
ss460140>
gpio dio
D0: DOUT=ON, DIN=HIGH (Inactive)
D1: DOUT=ON, DIN=HIGH (Inactive)
OK
ss460140>
gpio dio-d0 ON
D0: DOUT=ON, DIN=HIGH (Inactive)
ON
ss460140>
gpio diopullup-d1 off
D0: Pullup=ON
D1: Pullup=OFF
OK
Additional information
For more information and Python code examples for using the TransPort WR31 analog and digital I/O interface, visit
https://github.com/digidotcom/transport_examples
.
Command
Description
gpio ain [current | voltage]
Analog input control
gpio dio [{-D0-1 on | off}]
Digital input/output control
gpio diopullup [{-D0-1 on | off}]
Digital input/output pullup control