8,367
edits
Changes
→40pin GPIO port test
=== 40pin GPIO port test ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>''''''The Linux system released by Orange Pi has a pre -installed blink_all_gpio program. This program will set up all 28 GPIO ports in 40pin to switch high and low levels.'''
'''After running the blink_all_gpio program, when using a multimeter to measure the level of the GPIO port, you will find that the GPIO pin will be switched between 0 and 3.3v. Use this program to test whether the GPIO port can work normally'''
'''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 a password here'''</big>|}
# A total of 28 GPIO ports can be used in the development board 40pin. Below is No. 7 pins -corresponding GPIO as GPIO4_A4 -corresponding WPI serial number 2 -as an example how to set the height of the GPIO port
::[[File:pi3b-img259.png]]
<ol start="2" style="list-style-type: decimal;">
<li>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</li></ol> root@orangepi:~/wiringOP# '''gpio mode 2 out'''
{| class="wikitable" style="width:800px;"
|-
|
root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">2</span> out'''
|}
</ol>
<ol start="3" style="list-style-type: decimal;">
<li>Then set the GPIO port to output the low level. After setting, you can use the value of the voltage of the pins with a multimeter. If it is 0v, it means that the low -electric flat is successful</li></ol>
{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio write <span style="color:#FF0000">2 </span> 0'''|}
Using GPIO Readall, you can see the value of the No. 7 pin (v) to 0
[[File:pi3b-img260.png]]
</ol>
<ol start="4" style="list-style-type: decimal;">
<li>Then set the GPIO port output high level. After setting, you can use the voltage of the voltage of the permanent meter to measure the voltage. If it is 3.3V, it means that the high-electricity level is successful</li></ol>
{| class="wikitable" style="width:800px;" |-| root@orangepi:~/wiringOP# '''gpio write <span style="color:#FF0000">2 </span> 1'''|}
Using GPIO Readall, you can see the value of No. 7 pin (v) into 1
[[File:pi3b-img261.png]]
</ol>
<ol start="5" style="list-style-type: decimal;">
<li>The setting method of other pins is similar. Just modify the serial number of the wPi sequence number as the corresponding serial number corresponding to the pin</li></ol>
<span id="pin-gpio-port--down-and-downward-pull--down-resistance-setting-method"></span>
=== 40Pin GPIO Port -down and downward pull -down resistance setting method ===