8,367
edits
Changes
→40pin GPIO port test
<p>[[File:zero2w-img171.png]]</p></li>
<li><p>First set the GPIO port to output mode, and the third parameter needs to be the serial number of the wPi corresponding to the input pin.</p>
{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">2 </span> out'''</p>|}</li>
<li><p>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 the low level is set successfully.</p>
{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''gpio write 2 <span style="color:#FF0000">0</span>'''</p>|}</li>
<li><p>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 the setting of the high level is successful.</p>
{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''gpio write 2 <span style="color:#FF0000">1</span>'''</p>|}</li>
<li><p>The setting method for other pins is similar. You only need to modify the serial number of wPi to the serial number corresponding to the pin.</p></li></ol>
<span id="how-to-set-the-pull-down-resistor-of-40-pin-gpio-port"></span>
=== How to set the pull-down resistor of 40 Pin GPIO port ===