Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 5 Plus

326 bytes added, 17:40, 6 June 2023
How to install wiringOP
== How to install wiringOP ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''Note that wiringOP has been pre-installed in the linux image released by Orange Pi. Unless the code of wiringOP is updated, there is no need to re-download, compile and install, 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.'''</big>
<div class="figure">
</div>
 <big>'''wiringOP is currently mainly adapted to the functions of setting GPIO port input and output, setting GPIO port output high and low levels, and setting up and down pull-down resistors. Functions such as hardware PWM are not available.'''</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 Orange Pi 5 Plus needs to download the code of the wiringOP next branch, please don't miss the -b next parameter.'''</p><p>'''If you have problems downloading the code from GitHub, you can directly use the wiringOP source code that comes with the Linux image, and 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>Test the output of the gpio readall command as follows</p>
<div class="figure">
<span id="pin-interface-gpio-i2c-uart-spi-can-and-pwm-test"></span>
 
== 40 pin interface GPIO, I2C, UART, SPI, CAN and PWM test ==