Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 3B

1,369 bytes added, 09:06, 24 August 2023
Interface details of Orange Pi 3B
|-
|
<big>'''The diameter of the four positioning holes is 32.0mm7mm, and the diameter of the M.2 PICE device fixing hole is 32.5mm9mm.'''</big>
|}
# From the table below, the I2C available for Orange Pi 3B is I2C2, I2C3, and I2C4 a total of three groups of I2C bus.
::[[File:pi3b-img266-1.png]]
::{| class="wikitable" style="background-color:#ffffdc;width:800px;"
# As can be seen from the table below, the uart available for Orange Pi 3B is uart3, uart7, and uart9. There are three sets of uart bus
::[[File:pi3b-img268-1.png]]
::{| class="wikitable" style="background-color:#ffffdc;width:800px;"
<big>'''As can be seen from the above table, i2c3_m0 and uart3_m0 are reused by pins, and the two cannot be opened at the same time'''</big>
|}
 <ol start="2" style="list-style-type:decimal;"><li><p>In the linux system, the UART in the 40 pins is closed by default, and it needs to be opened manually before it can be used. The detailed steps are as follows:</p><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add sudo permission</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<bigp>'''In the Linux system, the uart in 40pin is closed by default, and it needs to be opened manually to use.'''</big>  '''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the uart3, uart7, and uart9 at the same time. If you only need to open one, you can fill in one..'''  orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' orangepi-config'''<span style="color:#FF0000">overlays=uart3-m0 uart7-m2 uart9-m2</spanp>'''
|}
</li>
<li><p>Then select '''System'''</p>
<p>[[File:pi3b-1.png]]</p>
</li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:pi3b-2.png]]</p>
</li>
<li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select the UART configuration you want to open</p>
<p>[[File:pi3b-3-3.png]]</p>
</li>
<li><p>Then select '''<Save>''' to save</p>
<p>[[File:pi3b-4.png]]</p>
</li>
<li><p>Then select '''<Back>'''</p>
<p>[[File:pi3b-5.png]]</p>
</li>
<li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p>
<p>[[File:pi3b-6.png]]</p>
</li>
</ol>
</li></ol>
<ol start="23" style="list-style-type: decimal;">
<li>After entering the Linux system, first confirm whether there is a device node corresponding to uart under/dev</li>
|}
</ol>
<ol start="34" style="list-style-type: decimal;">
<li>Then start testing the uart interface, first use the rx and tx of the uart interface to be tested by DuPont</li>
|Corresponding to the 27 pin
|Corresponding to the 15 pin
|Corresponding to the 7 22 pin
|}
[[File:pi3b-img269-1.png]]
</ol>
<ol start="45" style="list-style-type: decimal;">
<li><p>Use the '''gpio serial''' command to test the loop function of the serial port as shown below. If you can see the following printing, it means that the serial communication is normal</p>
<ol style="list-style-type: lower-alpha;">
# From the table below, the pwm11 available for Orange Pi 3B
::[[File:pi3b-img270-1.png]]
<ol start="2" style="list-style-type:decimal;"><li><p>In the linux system, the PWM in the 40 pin is turned off by default, and it needs to be turned on manually before it can be used. The detailed steps are as follows:</p><ol style="list-style-type: lower-alpha;"><li><p>First run '''orangepi-config''', normal users remember to add sudo permission</p>{| class="wikitable" style="width:800px;"
|-
|
'''In the Linux system, the pwm in 40pin is closed by default, and it needs to be opened manually to use..'''  '''Add the configuration of the red font part below to the /boot/orangepiEnv.txt, and then restart the Linux system to open the pwm11.'''  <p>orangepi@orangepi:~$ '''sudo vim /boot/orangepiEnv.txt''' orangepi-config'''<span style="color:#FF0000">overlays=pwm11-m1</spanp>'''
|}
</li>
<li><p>Then select '''System'''</p>
<p>[[File:pi3b-1.png]]</p>
</li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:pi3b-2.png]]</p>
</li>
<li><p>Then use the arrow keys on the keyboard to navigate to the position shown in the figure below, and then use the '''space''' to select the PWM configuration you want to open</p>
<p>[[File:pi3b-3-4.png]]</p>
</li>
<li><p>Then select '''<Save>''' to save</p>
<p>[[File:pi3b-4.png]]</p>
</li>
<li><p>Then select '''<Back>'''</p>
<p>[[File:pi3b-5.png]]</p>
</li>
<li><p>Then select '''<Reboot>''' to restart the system to make the configuration take effect</p>
<p>[[File:pi3b-6.png]]</p>
</li>
</ol>
</li></ol>
<ol start="23" style="list-style-type: decimal;"><li>After opening a pwm, a there will be an extra pwmchipX in '''/sys/class/pwm/''' (X is a specific number) will be available in, for example, after opening pwm11, check the pwmchipX under '''/sys/class/pwm/'''one becomes two</li>
{| class="wikitable" style="width:800px;"
|-
|}
</ol>
<ol start="34" style="list-style-type: decimal;"><li><p>Which pwmchip above corresponds to pwm11 above? Let, let's first check out the output of the '''ls /sys/class/pwm/ -l''' commandfirst, as shown below: </p></li><li><p>The Then it can be known from the table below that the base address of the pwm11 register is Fe6F0030. Then see fe6f0030, and then look at the output of the '''ls /sys/class/pwm/ -l''' command, you can see that the pwmchip1 is linked to fe6f0030.pwm is connected to the pwmchip1, so the PWM11 corresponding pwm11 corresponds to pwmchip is as pwmchip1</p></li>
<div class="figure">
</div></ol>
<ol start="56" style="list-style-type: decimal;"><li>Then use the following command to allow make pwm11 to output a 50Hz square wave (please switch to the root user first, and then execute the following command)</li>
{| class="wikitable" style="width:800px;"
|-
[[File:pi3b-img272.png]]
 
<li>The test method of pwm11 demonstrated above is similar to other pwm test methods.</li>
</ol>
<span id="how-to-install-and-use-wiringop-python"></span>
== How to install and use WiringopwiringOP-Python ==
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''WiringopwiringOP-Python is the library of the Python language version of Wiringop. It wiringOP, which is used to operate the hardware resources of the development board's , such as GPIO, I2C, SPI and UART hardware resources such as the development board , in the Python program.'''
'''Please In addition, please note that all the following command below is commands are operated under the <span style="color:#FF0000">root</span> user.'''</big>
|}
<span id="wiringop-python-installation-method"></span>
=== WiringopwiringOP-Python installation method ===
# First install the dependency package
|-
|
<big>'''Note that the following git clone--recursivee command will automatically download the source code of WiringopwiringOP, because WiringopwiringOP-Python depends on WiringopwiringOP. Please make sure that the download process does not report an error due to network problems.'''
'''If there is a problem with the download code from GitHub, you can use the WiringopwiringOP-Python source code that comes with the Linux image directly, and the storage location is:/usr/src/wiringOP-Python'''</big>
|}
{| class="wikitable" style="width:800px;"
</ol>
<ol start="5" style="list-style-type: decimal;">
<li><p>Test whether the WiringopwiringOP-Python is installed successfully under the Python command line is shown below: </p>
<ol style="list-style-type: lower-alpha;">
<li>First use the Python3 command to enter the command line mode of Python3</li>
</ol>
<ol start="3" style="list-style-type: lower-alpha;">
<li>Enter the following command to view the help information of WiringopwiringOP-Python, and press the '''q''' key to exit the interface of the help information</li>
{| class="wikitable" style="width:800px;"
|-
|-
|
<big>'''WiringopwiringOP-Python is the same as Wiringop. You wiringOP, you can also determine which GPIO pink can be determined pin to operate by specifying the WPI wPi number. Because , because there is no command to check the WPI wPi number in WiringopwiringOP-Python, so you can only check the board WPI wPi number and physical physical physics through the GPIO command in Wiringop. The corresponding relationship of the pinCorrespondence between pins.'''</big>
<div class="figure">