range Pi User Manual Copyright reserved by Shenzhen Xunlong Software Co., Ltd
184
The method of running blink_all_gpio program is shown below
:
orangepi@orangepi3b:~$ sudo blink_all_gpio #Remember to add sudo permissions
[sudo] password for orangepi: #You need to enter password here
1) There are a total of 28 GPIO ports in the 40pins of the development board that can be
used. The following uses pin 7 — the corresponding GPIO is GPIO4_C3 — — the
corresponding wPi serial number is 2—as an example to demonstrate how to set the high
and low levels of the GPIO port
2) First set the GPIO port as the output mode, the third parameter needs to enter the
serial number of the wPi corresponding to the pins
root@orangepi:~/wiringOP# gpio mode 2 out
3) Then set the GPIO port to output a low level. After setting, you can use a multimeter
to measure the voltage value of the pin. If it is 0v, it means that the low level is set
successfully.
root@orangepi:~/wiringOP# gpio write 2 0
Using gpio readall, you can see the value of the No. 7 pin (V) to 0
4) Then set the GPIO port to output a high level. After setting, you can use a multimeter
to measure the voltage value of the pin. If it is 3.3v, it means that the high level is set
successfully.
root@orangepi:~/wiringOP# gpio write 2 1