Changes

Jump to: navigation, search

Orange Pi Zero 2W

335 bytes added, 10:21, 26 September 2023
How to install wiringOP
== How to install wiringOP ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that wiringOP is already pre-installed in the linux image released by Orange Pi. Unless the wiringOP code is updated, there is no need to re-download, compile and install, you can just use it directly.''' 
'''The storage path of the compiled wiringOP deb package in orangepi-build is: '''
'''<span style="color:blue">orangepi-build/external/cache/debs/arm64/wiringpi_x.xx.deb</span>'''
'''After entering the system, you can run the gpio readall command. If you can see the following output, it means that wiringOP has been pre-installed and can be used normally.'''
[[File:zero2w'''After entering the system, you can run the gpio readall command. If you can see the following output, it means that wiringOP has been pre-img170installed and can be used normally.png]]'''</big>
[[File:zero2w-img170.png|center]] <big>'''WiringOP currently mainly adapts to the functions of setting GPIO port input and output, setting GPIO port output high and low levels, and setting pull-up and pull-down resistors. Functions such as hardware PWM cannot be used.'''</big>|}
<ol style="list-style-type: decimal;">
<li><p>Download the code of wiringOP</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''sudo apt update'''</p>
<p>orangepi@orangepi:~$ '''sudo apt install -y git'''</p>
<p>orangepi@orangepi:~$ '''git clone https://github.com/orangepi-xunlong/wiringOP.git -b next'''</p>
|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that the source code needs to download the code of wiringOP next branch. Please don't miss the -b next parameter.'''</p><p>'''If there is a problem downloading the code from GitHub, you can directly use the wiringOP source code that comes with the Linux image. The storage location is: /usr/src/wiringOP.'''</p></big>|}</li>
<li><p>Compile and install wiringOP</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''cd wiringOP'''</p>
<p>orangepi@orangepi:~/wiringOP$ '''sudo ./build clean'''</p>
<p>orangepi@orangepi:~/wiringOP$ '''sudo ./build'''</p>|}</li>
<li><p>The output of the test gpio readall command is as follows</p>
<p>[[File:zero2w-img170.png]]</p></li></ol>
<span id="pin-interface-gpio-i2c-uart-spi-and-pwm-testing"></span>
 
== 40pin interface GPIO, I2C, UART, SPI and PWM testing ==

Navigation menu