Laird WB45NBT Reference Manual page 22

Hide thumbs Also See for WB45NBT:
Table of Contents

Advertisement

WB45NBT
Reference Guide
To work with a pin as an output, follow these steps:
Export the pin.
Set its direction as an output.
Set it to the desired value.
To work with the pin as an input, follow these steps:
Export the pin.
Set its direction as an input.
Note:
These are set as inputs by default so this step is likely unnecessary.
Read value.
For example, to change GPIO3 to an output and set it high:
# cd /sys/class/gpio
# echo 75 > export
# echo 'out' > pioC11/direction
# echo '1' > pioC11/value
# cat pioC11/value
1
Note:
GPIOs are set as inputs by default. The value reflects the input value on the pin.
12.1.1.1 export
# echo 75 > export
12.1.1.2 set input
# echo 'in' > pioC11/direction
12.1.1.3 read input value
This must be first set as input.
# cat pioC11/value
0
12.1.1.4 set output
# echo 'out' > pioC11/direction
12.1.1.5 set pin value
Must be first set as output.
# echo '1' > pioC11/value
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
22
© Copyright 2017 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610

Advertisement

Table of Contents
loading

Table of Contents