Changes

Jump to: navigation, search

Orange Pi Zero 2W

511 bytes added, 10:32, 26 September 2023
How to set the pull-down resistor of 40 Pin GPIO port
<p>[[File:zero2w-img171.png]]</p></li>
<li><p>First, you need to set the GPIO port to input 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> in'''</p>|}</li>
<li><p>After setting to input mode, execute the following command to set the GPIO port to pull-up mode.</p>
{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">2 </span> up'''</p>|}</li>
<li><p>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.</p>
{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''gpio read <span style="color:#FF0000">2</span>'''</p><p>'''<span style="color:#FF0000">1</span>'''</p>|}</li>
<li><p>Then execute the following command to set the GPIO port to pull-down mode</p>
{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''gpio mode <span style="color:#FF0000">2 </span> down'''</p>|}</li>
<li><p>Then enter the following command to read the level of the GPIO port. If the level is 0, it means that the pull-down mode is set successfully.</p>
{| class="wikitable" style="width:800px;" |-| <p>root@orangepi:~/wiringOP# '''gpio read <span style="color:#FF0000">2</span>'''</p><p>'''<span style="color:#FF0000">0</span>'''</p>|}</li></ol>
<span id="pin-spi-test"></span>
 
=== 40pin SPI test ===

Navigation menu