Orange Pi User Manual
Copy right by Shenzhen Xunlong Softwawre Co., Ltd
www.orangepi.org
18
V
.
Usage of GPIO
Modify and Display of the GPIO Status Under ADB Mode
Get the Open/Close Status of GPIO : cat /sys/devices/virtual/misc/mtgpio/pin
Enter the command under ADB mode: cat /sys/devices/virtual/misc/mtgpio/pin , then it will show
:
pin: [mode] [pull_sel] [din] [dout] [pull en] [dir] [ies] [smt]
0:11101010
1:01101010
、、、、、、
22:1-100-10-1-1
、、、、、、、
42
:
00000110
Corresponding meaning per row
:
IO Number
:
mode
,
pull select
,
input value
,
output value
,
pull enable
,
direction
,
ies
Modify the Status of GPIO
:
You could get the 40pin GPIO specifications from this manual or from schematic which have been
uploaded to our official website:
http://www.orangepi.org/downloadresources/.
For example the 37
th
pin on 40pins is GPIO123,
echo -wdout123 1 > pin -This is Set the GPIO to output high level
echo -wdout123 0> pin
-This is Set the GPIO to output high level