range Pi User Manual Copyright reserved by Shenzhen Xunlong Software Co., Ltd
186
2) First of all, you need to set the GPIO port as the input mode. The third parameter
needs to enter the serial number of the wPi corresponding to the pins
root@orangepi:~/wiringOP# gpio mode 5 in
3) After the setting is set to input mode, execute the following command to set the GPIO
port as the pull-up mode
root@orangepi:~/wiringOP# gpio mode 5 up
4) Then enter the following command to read the level of the GPIO port, if the level is 1,
it means that the pull-up mode is set successfully
root@orangepi:~/wiringOP# gpio read 5
1
5) Then execute the following command to set the GPIO port to pull-down mode
root@orangepi:~/wiringOP# gpio mode 5 down
6) Then enter the following command to read the level of the GPIO port, if the level is 0,
the pull-down mode is set successfully
root@orangepi:~/wiringOP# gpio read 5
0
3.16.3. 40pin SPI Test
1) From the schematic diagram of the 40PIN interface, the SPI available for Orange Pi
3B is spi3