APEX ORIN NANO GPIO Digital Input#

Hardware Connection#

PIN Definition#

接口名称

DB9针脚序号

接口说明

设备节点

DI_0

1

GPIO IN

/dev/gpio/di0

DI_1

2

GPIO IN

/dev/gpio/di1

DO_0

3

GPIO OUT

/dev/gpio/do0

DO_1

4

GPIO OUT

/dev/gpio/do1

GND

6-9

地


DO Hardware Specification#


Description

Vref

Voltage to be supplied externally at the user side.

Passive Load

E.g. LED, Relay, Solenoid Valve.

Active Sourcing Input

Active Sourcing Input, DI of PLC, e.g.


Specification

Vref

3.3~36V

DO Usage#

The usage of GPIO is as below

sudo /opt/miivii/features/gpio/bin/miivii_get_di_value <DI number>
#<DI number>: Represents the sequence number of the DI. 0 represents DI0, 1 represents DI1, and so on.
#The command return value is the current level value read from the DI, where 0 represents low level and 1 represents high level.

#Example: Read the input of DI0
#sudo /opt/miivii/features/gpio/bin/miivii_get_di_value 0

Compile sample code

cp -r /opt/miivii/features ~/
cd ~/features/gpio
sudo make;