10 How to Access the Interfaces Under Linux
BoltGATE 20-25 User Manual Rev. 1-1
10.9
Digital I/O
The BoltGATE 20-25 exposes the Digital I/Os (GPIOs) as follows:
l
Digital Input 1:
/dev/digital_in1/value
l
Digital Input 2:
/dev/digital_in2/value
l
Digital Input 3:
/dev/digital_in3/value
l
Digital Input 4:
/dev/digital_in4/value
l
Digital Output 1:
/dev/digital_out1/value
l
Digital Output 2:
/dev/digital_out2/value
l
Digital Output 3:
/dev/digital_out3/value
l
Digital Output 4:
/dev/digital_out4/value
To set ON/OFF a Digital Output (for example Digital Output 1), enter the following commands:
#set the Digital Output to ON
echo 1 > /dev/digital_out1/value
#set the Digital Output to OFF
echo 0 > /dev/digital_out1/value
To read the state of a Digital Input (for example Digital Input 1), enter the following command:
#read the state of a Digital Input
cat /dev/digital_in1/value
The reply to the command is the following:
l
If the Digital Input is ON, you will obtain the value "1"
l
If the Digital Input is OFF, you will obtain the value "0"
To read the state of a Digital Output (for example Digital Output 1), enter the following command:
#read the state of a Digital Outpu
cat /dev/digital_out1/value
The reply to the command is the following:
l
If the Digital Output is ON, you will obtain the value "1"
l
If the Digital Output is OFF, you will obtain the value "0"
78 / 102
Содержание BoltGATE 20-25
Страница 4: ...This page has been intentionally left blank...
Страница 12: ...This page has been intentionally left blank...
Страница 14: ...This page has been intentionally left blank...
Страница 16: ...This page has been intentionally left blank...
Страница 24: ...This page has been intentionally left blank...
Страница 48: ...This page has been intentionally left blank...
Страница 66: ...This page has been intentionally left blank...
Страница 86: ...This page has been intentionally left blank...
Страница 92: ...This page has been intentionally left blank...
Страница 94: ...This page has been intentionally left blank...
Страница 98: ...This page has been intentionally left blank...
Страница 101: ...BoltGATE 20 25 User Manual Rev 1 1 Notes NOTES 101 102...