Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero 2W

525 bytes removed, 15:01, 25 September 2023
no edit summary
<div class="figure">
[[File:media/image3zero2w-img3.png]]
</div>
<div class="figure">
[[File:media/image4zero2w-img4.png]]
</div>
<div class="figure">
[[File:media/image5zero2w-img5.png]]
</div>
<div class="figure">
[[File:media/image6zero2w-img6.png]]
</div>
[[File:media/image7zero2w-img7.png]]
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
<ol style="list-style-type: decimal;">
<li><p>TF card, high-speed SanDisk card with minimum capacity of 8GB, class 10 or above</p>
<p>[[File:media/image8zero2w-img8.png]]</p>
<p>'''When using other brands of TF cards (non-SanDisk TF cards), as shown in the picture below (including but not limited to these cards), some friends have reported that problems will occur during system startup, such as the system getting stuck halfway through startup. Or the reboot command cannot be used normally, and it was finally solved after replacing the SanDisk TF card. Therefore, if you are using a non-SanDisk TF card and find problems with system startup or use, please replace it with a SanDisk TF card and then test again.'''</p>
<p>[[File:media/image9zero2w-img9.png]][[File:media/image10zero2w-img10.png]][[File:media/image11zero2w-img11.png]][[File:media/image12zero2w-img12.png]]</p>
<p>'''There are currently reports that some TF cards have problems booting on Orange Pi Zero 2w.'''</p>
<p>'''In addition, TF cards that can be used normally on other types of development boards are not guaranteed to be able to start normally on Orange Pi Zero 2w. Please pay special attention to this point.'''</p></li>
<li><p>TF card reader, used to read and write TF cards</p>
<p>[[File:media/image13zero2w-img13.png]]</p></li>
<li><p>Mini HDMI to HDMI cable, used to connect the development board to an HDMI monitor or TV for display</p></li></ol>
<div class="figure">
[[File:media/image14zero2w-img14.png]]
</div>
<ol start="4" style="list-style-type: decimal;">
<li><p>Power supply. If you have a 5V/2A or 5V/3A power supply, you only need to prepare a USB to Type C interface data cable as shown in the picture on the left below. You can also use a cable similar to the picture on the right below. 5V/2A or 5V/3A high-quality USB Type C interface power adapter integrated with the power head.</p>
<p>[[File:media/image15zero2w-img15.png]] [[File:media/image16zero2w-img16.png]]</p>
<p>'''Both Type-C interfaces on the development board can be used for power supply.'''</p>
<div class="figure">
[[File:media/image17zero2w-img17.png]]
</div></li>
<li><p>24pin expansion board</p>
<p>[[File:media/image18zero2w-img18.png]]</p></li>
<li><p>USB interface mouse and keyboard, as long as it is a standard USB interface mouse and keyboard, the mouse and keyboard can be used to control the Orange Pi development board</p></li>
<li><p>Infrared remote control, mainly used to control Android TV system</p>
<p>[[File:media/image19zero2w-img19.png]]</p>
<p>'''Note that the remote control of the air conditioner or the TV cannot control the Orange Pi development board. By default, only the remote control provided by Orange Pi can.'''</p></li>
<li><p>Network cable to connect the development board to the Internet</p></li>
<li><p>AV video cable. If you want to display video through the TV-OUT interface instead of the HDMI interface, you need to connect the development board to the TV through the AV video cable.</p>
<p>[[File:media/image20zero2w-img20.png]]</p></li>
<li><p>Heat sink. If you are worried that the temperature of the development board is too high, you can add some heat sinks and stick the heat sinks on the H618 chip and memory chip.</p>
<p>[[File:media/image21zero2w-img21.png]] [[File:media/image22zero2w-img22.png]]</p></li>
<li><p>5V cooling fan, as shown in the figure below. There are 5V and GND pins on the 40pin interface of the development board that can be connected to the cooling fan. The spacing of the 40pin pins is 2.54mm. The power interface of the cooling fan can be purchased according to this specification.</p>
<p>[[File:media/image23zero2w-img23.png]]</p>
<p>'''Note that the 5V pin can be used directly after the development board is plugged in and no other settings are required. In addition, the voltage output by the 5V pin cannot be adjusted or turned off through software.'''</p>
<p>'''The pin headers on the 40pin interface are not soldered by default, and you need to solder them yourself before you can use them.'''</p></li>
<li><p>Type-C to USB cable for connecting USB devices</p>
<p>[[File:media/image24zero2w-img24.png]]</p></li>
<li><p>USB to TTL module and Dupont cable. When using the serial port debugging function, a USB to TTL module and Dupont cable are needed to connect the development board and the computer.</p>
<p>[[File:media/image25zero2w-img25.png]] [[File:media/image26zero2w-img26.png]]</p>
<p>'''Note that the TTL level used by the development board is 3.3v. In addition to the USB to TTL module shown in the picture above, other similar 3.3v USB to TTL modules are generally available.'''</p></li>
<li><p>X64 computer with Ubuntu and Windows operating systems installed</p></li></ol>
<ol start="5" style="list-style-type: decimal;">
<li><p>After entering the balenaEtcher download page, click the green download button to jump to the software download location.</p>
<p>[[File:media/image27zero2w-img27.png]]</p></li>
<li><p>Then you can choose to download the Portable version of balenaEtcher software. The Portable version does not need to be installed. You can use it by double-clicking to open it.</p>
<p>[[File:media/image28zero2w-img28.png]]</p></li>
<li><p>If you downloaded the version of balenaEtcher that needs to be installed, please install it first and then use it. If you downloaded the Portable version of balenaEtcher, just double-click to open it. The balenaEtcher interface after opening is as shown below.</p>
<p>[[File:media/image29zero2w-img29.png]]</p></li></ol>
'''If the following error is prompted when opening balenaEtcher:'''
[[File:media/image30zero2w-img30.png]]
'''Please select balenaEtcher, right-click, and select Run as administrator.'''
[[File:media/image31zero2w-img31.png]]
<ol start="8" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image32zero2w-img32.png]]
</div></li>
<li><p>The interface displayed during the process of burning the Linux image by balenaEtcher is as shown in the figure below. In addition, the progress bar displays purple to indicate that the Linux image is being burned into the TF card.</p>
<p>[[File:media/image33zero2w-img33.png]]</p></li>
<li><p>After the Linux image is burned, balenaEtcher will also verify the image burned into the TF card by default to ensure that there are no problems during the burning process. As shown in the figure below, a green progress bar indicates that the image has been burned, and balenaEtcher is verifying the burned image.</p>
<p>[[File:media/image34zero2w-img34.png]]</p></li>
<li><p>After successful burning, the display interface of balenaEtcher is as shown below. If the green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, then pull out the TF card and insert it into the TF card slot of the development board for use.</p>
<div class="figure">
[[File:media/image35zero2w-img35.png]]
</div></li></ol>
<div class="figure">
[[File:media/image36zero2w-img36.png]]
</div></li>
<li><p>Then click &quot;'''Format'''&quot;. A warning box will pop up before formatting. After selecting &quot;'''Yes (Y)'''&quot;, formatting will begin.</p></li></ol>
[[File:media/image37zero2w-img37.png]]
<ol start="5" style="list-style-type: lower-alpha;">
<li><p>After formatting the TF card, the information shown in the picture below will pop up, click OK.</p>
<p>[[File:media/image38zero2w-img38.png]]</p></li></ol>
<!-- -->
<div class="figure">
[[File:media/image39zero2w-img39.png]]
</div></li>
<ol start="4" style="list-style-type: decimal;">
<li><p>After entering the balenaEtcher download page, click the green download button to jump to the software download place.</p>
<p>[[File:media/image27zero2w-img27.png]]</p></li>
<li><p>Then choose to download the Linux version of the software</p>
<p>[[File:media/image40zero2w-img40.png]]</p></li>
<li><p>Download the compressed package of the Linux operating system image file you want to burn from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''Orange Pi information download page'''], and then use the decompression software to decompress it. In the decompressed file, the file ending with &quot;.img&quot; is the image file of the operating system. The size is generally above 1GB. The decompression command for the compressed package ending in 7z is as follows:</p>
<p>test@test:~$ '''7z x orangepizero2w_1.0.0_ubuntu_focal_desktop_linux6.1.31.7z'''</p>
<p>orangepizero2w_1.0.0_ubuntu_focal_desktop_linux6.1.31.img: '''successful'''</p></li>
<li><p>Then double-click '''balenaEtcher-1.14.3-x64.AppImage''' on the graphical interface of Ubuntu PC to open balenaEtcher '''(no installation required)'''. The interface after balenaEtcher is opened is as shown below</p>
<p>[[File:media/image41zero2w-img41.png]]</p></li>
<li><p>The specific steps to use balenaEtcher to burn a Linux image are as follows</p>
<p>a. First select the path of the Linux image file to be burned.</p>
<div class="figure">
[[File:media/image32zero2w-img32.png]]
</div></li>
<li><p>The interface displayed during the process of burning the Linux image by balenaEtcher is as shown in the figure below. In addition, the progress bar displays purple to indicate that the Linux image is being burned into the TF card.</p>
<p>[[File:media/image42zero2w-img42.png]]</p></li>
<li><p>After the Linux image is burned, balenaEtcher will also verify the image burned into the TF card by default to ensure that there are no problems during the burning process. As shown in the figure below, a green progress bar indicates that the image has been burned, and balenaEtcher is verifying the burned image.</p>
<p>[[File:media/image43zero2w-img43.png]]</p></li>
<li><p>After successful burning, the display interface of balenaEtcher is as shown below. If a green indicator icon is displayed, it means that the image burning is successful. At this time, you can exit balenaEtcher, then pull out the TF card and insert it into the TF card slot of the development board for use.</p>
<p>[[File:media/image44zero2w-img44.png]]</p></li></ol>
<span id="method-of-burning-android-image-to-tf-card"></span>
<li><p>First, please make sure that '''Microsoft Visual C++ 2008 Redistrbutable - x86'''</p>
<p>is installed on your Windows system.</p>
<p>[[File:media/image45zero2w-img45.png]]</p></li>
<li><p>If '''Microsoft Visual C++ 2008 Redistrbutable - x86''' is not installed</p>
<p>, using '''PhoenixCard''' to format the TF card or burn the Android image will prompt the following error</p>
<div class="figure">
[[File:media/image46zero2w-img46.png]]
</div></li>
<li><p>'''Microsoft Visual C++ 2008 Redistrbutable - x86''' installation package can be downloaded from the [http://www.orangepi.org/html/serviceAndSupport/index.html '''official tool'''] of Orange Pi Zero 2w, or you can download it from [https://www.microsoft.com/zh-cn/download/details.aspx?id=26368 '''Microsoft's official website''']</p>
<p>[[File:media/image47zero2w-img47.png]] [[File:media/image48zero2w-img48.png]]</p></li>
<li><p>Then prepare a TF card with 8GB or larger capacity. The transmission speed of the TF card must be class10 or above. It is recommended to use TF cards from SanDisk and other brands.</p></li>
<li><p>Then use the card reader to insert the TF card into the computer</p></li>
<div class="figure">
[[File:media/image49zero2w-img49.png]]
</div></li>
<li><p>Then use decompression software to decompress the compressed package of the downloaded Android image. In the decompressed file, the file ending with &quot;'''.img'''&quot; is the Android image file, with a size of more than 1GB. If you don’t don't know how to decompress the Android image compressed package, you can install a '''360 compression software''' to decompress the image.</p><p>[[File:media/image50zero2w-img50.png]]</p></li>
<li><p>Then use decompression software to decompress '''PhonixCard4.2.8.zip'''. This software does not need to be installed. Just find PhoenixCard in the decompressed folder and open it.</p>
<p>[[File:media/image51zero2w-img51.png]]</p></li>
<li><p>After opening PhoenixCard, if the TF card is recognized normally, the drive letter and capacity of the TF card will be displayed in the middle list. '''Please make sure that the displayed drive letter is consistent with the drive letter of the TF card you want to burn'''. If If there is no display, you can try to remove the TF card, or click the &quot;'''Refresh Drive Letter'''&quot; button in PhoenixCard.</p></li></ol>
[[File:media/image52zero2w-img52.png]]
<ol start="10" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image53zero2w-img53.png]]
</div>
<p>b. Select &quot;'''Start Card'''&quot; in &quot;'''Card Type'''&quot;</p>
<p>c. Then click the &quot;'''Burn Card'''&quot; button to start burning.</p>
<p>[[File:media/image54zero2w-img54.png]]</p></li>
<li><p>After burning, the display of PhoenixCard is as shown below. At this time, click the &quot;'''Close'''&quot; button to exit PhoenixCard, and then you can pull out the TF card from the computer and insert it into the development board to start.</p>
<div class="figure">
[[File:media/image55zero2w-img55.png]]
</div>
<p>'''After burning the Android system, you can only see a 128 MB partition on the TF card in Windows. The displayed partition is as shown below (some computers may pop up more than twenty disk partitions, but they can only open the 128 MB one. partition), please note that this is normal, please do not think that the TF card is burned out. The reason for this is that there are more than twenty partitions in the Android system, but most of them cannot be recognized normally in the Windows system. At this time, please feel free to unplug the TF card and insert it into the development board to start.'''</p>
<p>[[File:media/image56zero2w-img56.png]]</p>
<p>'''After the Android system starts, you can use the following command to see the twenty partitions in the TF card:'''</p>
<p>[[File:media/image57zero2w-img57.png]]</p>
<p>'''Using the df -h command, you can see that after burning the Android system on the 16GB TF card, there is about 11 GB of space available (not all of the more than twenty partitions will be mounted to the Android system, focus on these to see to the partition you want to reach).'''</p>
<p>[[File:media/image58zero2w-img58.png]]</p></li></ol>
<span id="instructions-for-using-micro-linux-system-in-onboard-spi-flash"></span>
There is a 16MB SPI Flash on the development board, and its location is shown in the figure below:
[[File:media/image59zero2w-img59.png]]
A micro Linux system is programmed into SPI Flash by default. This system is mainly used to prove that the development board can start normally. After getting the development board, there is no need to burn the system into the TF card. You only need to connect the Type-C power supply to the development board to start the micro Linux system in the SPI Flash. The main functions of this system are:
<div class="figure">
[[File:media/image17zero2w-img17.png]]
</div>
<div class="figure">
[[File:media/image60zero2w-img60.png]]
</div></li>
<li><p>The corresponding relationship between the GND, TX and RX pins of the debugging serial port of the development board is shown in the figure below</p>
<p>[[File:media/image61zero2w-img61.png]]</p>
<p>'''Note: The pin header on the 40pin interface is not soldered by default, and you need to solder it yourself before it can be used.'''</p></li>
<li><p>The GND, TX and RX pins of the USB to TTL module need to be connected to the debugging serial port of the development board through Dupont lines.</p>
</li>
<li><p>The schematic diagram of connecting the USB to TTL module to the computer and Orange Pi development board is as shown below</p>
<p>[[File:media/image62zero2w-img62.png]]</p><p>'''The TX and RX of the serial port need to be cross-connected. If you don’t don't want to carefully distinguish the order of TX and RX, you can casually connect the TX and RX of the serial port first. If there is no output from the test serial port, then exchange the order of TX and RX, so that the There is a right order.'''</p></li></ol>
<span id="how-to-use-the-debugging-serial-port-on-ubuntu-platform"></span>
<p>test@test:~$ '''sudo putty'''</p></li>
<li><p>After executing the putty command, the following interface will pop up</p>
<p>[[File:media/image63zero2w-img63.png]]</p></li>
<li><p>First select the serial port setting interface</p>
<div class="figure">
[[File:media/image64zero2w-img64.png]]
</div></li>
<div class="figure">
[[File:media/image65zero2w-img65.png]]
</div></li></ol>
<div class="figure">
[[File:media/image66zero2w-img66.png]]
</div></li></ol>
</li>
<li><p>Then start the development board, and you can see the Log information output by the system from the open serial terminal.</p>
<p>[[File:media/image67zero2w-img67.png]]</p></li></ol>
<span id="how-to-use-the-debugging-serial-port-on-windows-platform"></span>
<p>[https://mobaxterm.mobatek.net/ '''https://mobaxterm.mobatek.net/''']</p></li>
<li><p>Enter the MobaXterm download webpage and click '''GET XOBATERM &gt; NOW!'''</p>
<p>[[File:media/image68zero2w-img68.png]]</p></li>
<li><p>Then choose to download the Home version</p>
<p>[[File:media/image69zero2w-img69.png]]</p></li>
<li><p>Then select the Portable version. There is no need to install it after downloading. You can open it directly and use it.</p>
<div class="figure">
[[File:media/image70zero2w-img70.png]]
</div></li></ol>
</li>
<li><p>After downloading, use decompression software to decompress the downloaded compressed package to get the executable software of MobaXterm, and then double-click to open it.</p>
<p>[[File:media/image71zero2w-img71.png]]</p></li>
<li><p>After opening the software, the steps to set up the serial port connection are as follows:</p>
<p>a. Open the session settings interface</p>
<div class="figure">
[[File:media/image72zero2w-img72.png]]
</div>
<div class="figure">
[[File:media/image73zero2w-img73.png]]
</div></li></ol>
<div class="figure">
[[File:media/image74zero2w-img74.png]]
</div>
<p>c. The black DuPont wire needs to be plugged into the GND pin of the 40pin interface</p>
<p>d. The positions of the 5V pin and GND pin of the 40pin interface in the development board are as shown in the figure below. '''Remember not to connect them reversely.'''</p>
<p>[[File:media/image23zero2w-img23.png]]</p></li></ol>
<span id="debianubuntu-server-and-xfce-desktop-system-usage-instructions"></span>
<div class="figure">
[[File:media/image75zero2w-img75.png]]
</div>
<p>'''console=serial'''</p></li>
<li></li>
<li><p>As shown below, some commands that cannot be written in one line &gt; will be placed on the next line. As long as the black and bold &gt; parts are the commands that need to be entered. When these &gt; commands are entered into one line, the &quot;\&quot; at the end of &gt; each line needs to be removed. This is not part of the &gt; command. In addition, different parts of the command have &gt; spaces, please don’t don't miss them.</p>
<p>orangepi@orangepi:~$ '''echo \'''</p>
<p>'''&quot;deb [arch=$(dpkg --print-architecture) \'''</p>
<ol style="list-style-type: decimal;">
<li><p>The Linux system automatically logs in to the terminal by default. The default login user name is '''orangepi'''</p>
<p>[[File:media/image76zero2w-img76.png]]</p></li>
<li><p>Use the following command to set the root user to automatically log in to the terminal</p>
<p>orangepi@orangepi:~$ '''sudo auto_login_cli.sh root'''</p></li>
<div class="figure">
[[File:media/image77zero2w-img77.png]]
</div></li>
<div class="figure">
[[File:media/image78zero2w-img78.png]]
</div>
<p>orangepi@orangepi:~$ '''sudo desktop_login.sh root'''</p></li>
<li><p>Then restart the system and you will automatically log in to the desktop as the root user.</p>
<p>[[File:media/image79zero2w-img79.png]]</p>
<p>'''Note that if you use the root user to log in to the desktop system, you cannot use pulseaudio in the upper right corner to manage audio devices.'''</p>
<p>'''Also please note that this is not a bug, because pulseaudio is not allowed to run under the root user.'''</p></li>
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li>
<li><p>Then use the keyboard's arrow keys to locate the position shown &gt; in the picture below, and then use the space to select &gt; '''disable-leds'''</p>
<p>[[File:media/image82zero2w-img82.png]]</p></li>
<li><p>Then select '''&lt;Save&gt;'''to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select '''&lt;Back&gt;'''</p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li>
<li><p>After restarting and entering the system, you can see that the &gt; green LED light on the development board will no longer light &gt; up.</p></li></ol>
</li></ol>
<p>test@test:~$ '''sudo gparted'''</p></li>
<li><p>After opening gparted, you can select the TF card in the upper &gt; right corner, and then you can see the usage of the TF card &gt; capacity.</p>
<p>[[File:media/image86zero2w-img86.png]]</p></li>
<li><p>The picture above shows the situation of the TF card after &gt; burning the Linux desktop system. It can be seen that although &gt; the total capacity of the TF card is 16GB (displayed as &gt; 14.84GiB in GParted), the rootfs partition (/dev/ sdc1) Only &gt; 4.05GiB is actually allocated, leaving 10.79GiB unallocated</p></li></ol>
</li>
<ol start="4" style="list-style-type: decimal;">
<li><p>After starting the Linux system for the first time, we can also remove the TF card from the development board and reinsert it into the '''Ubuntu computer''', and then use gparted again to check the status of the TF card, as shown in the figure below, rootfs partition (/dev/ The capacity of sdc1) has been expanded to 14.69GiB</p>
<p>[[File:media/image87zero2w-img87.png]]</p></li></ol>
'''It should be noted that the Linux system has only one ext4 format partition and does not use a separate BOOT partition to store files such as kernel images, so there is no problem of BOOT partition expansion.'''
<p>test@test:~$ '''sudo gparted'''</p></li>
<li><p>After opening gparted, you can select the TF card in the upper right corner, and then you can see the usage of the TF card capacity. The picture below shows the situation of the TF card after burning the Linux desktop system. It can be seen that although the total capacity of the TF card is 16GB (displayed as 14.84GiB in GParted), the rootfs partition (/dev/sdc1) Only 4.05GiB is actually allocated, leaving 10.79GiB unallocated</p>
<p>[[File:media/image86zero2w-img86.png]]</p></li>
<li><p>Then select the rootfs partition (/dev/sdc1)</p>
<p>[[File:media/image88zero2w-img88.png]]</p></li>
<li><p>Right-click the mouse again to see the operation options shown in the picture below. If the TF card has been mounted, you first need to Umount the rootfs partition of the TF card.</p>
<p>[[File:media/image89zero2w-img89.png]]</p></li>
<li><p>Then select the rootfs partition again, right-click, and select '''Resize/Move''' to start expanding the size of the rootfs partition.</p>
<p>[[File:media/image90zero2w-img90.png]]</p></li>
<li><p>After the '''Resize/Move''' option is turned on, the following setting interface will pop up.</p>
<p>[[File:media/image91zero2w-img91.png]]</p></li>
<li><p>Then you can directly drag the position shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in '''New size(MiB)'''</p>
<p>[[File:media/image92zero2w-img92.png]]</p></li>
<li><p>After setting the capacity, click '''Resize/Move''' in the lower right corner.</p>
<p>[[File:media/image93zero2w-img93.png]]</p></li>
<li><p>After final confirmation, click the green '''√''' shown in the picture below.</p>
<p>[[File:media/image94zero2w-img94.png]]</p></li>
<li><p>Then select '''Apply''', and the capacity expansion of the rootfs partition will officially begin.</p>
<p>[[File:media/image95zero2w-img95.png]]</p></li>
<li><p>After the expansion is completed, click '''Close''' to close it.</p>
<p>[[File:media/image96zero2w-img96.png]]</p></li>
<li><p>Then you can unplug the TF card and insert it into the development board to start. After entering the Linux system of the development board, if you use the '''df -h''' command to see that the size of the rootfs partition is consistent with the size set previously, it means manual Expansion successful</p>
<p>root@orangepi:~# '''df -h'''</p>
<p>test@test:~$ '''sudo gparted'''</p></li>
<li><p>After opening gparted, you can select the TF card in the upper right corner, and then you can see the usage of the TF card capacity.</p>
<p>[[File:media/image97zero2w-img97.png]]</p></li>
<li><p>Then select the rootfs partition (/dev/sdc1)</p>
<p>[[File:media/image98zero2w-img98.png]]</p></li>
<li><p>Right-click the mouse again to see the operation options shown in the picture below. If the TF card is already mounted, you first need to Umount the rootfs partition of the TF card.</p>
<p>[[File:media/image99zero2w-img99.png]]</p></li>
<li><p>Then select the rootfs partition again, right-click the mouse, and select '''Resize/Move''' to start setting the size of the rootfs partition.</p>
<p>[[File:media/image100zero2w-img100.png]]</p></li>
<li><p>After the '''Resize/Move''' option is turned on, the following setting interface will pop up.</p>
<p>[[File:media/image101zero2w-img101.png]]</p></li>
<li><p>Then you can directly drag the position shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in '''New sieze(MiB)'''</p>
<p>[[File:media/image92zero2w-img92.png]]</p></li>
<li><p>After setting the capacity, click '''Resize/Move''' in the lower right corner.</p>
<p>[[File:media/image93zero2w-img93.png]]</p></li>
<li><p>After final confirmation, click the green '''√''' as shown in the picture below.</p>
<p>[[File:media/image94zero2w-img94.png]]</p></li>
<li><p>Then select '''Apply''', and the capacity expansion of the rootfs partition will officially begin.</p>
<p>[[File:media/image95zero2w-img95.png]]</p></li>
<li><p>After the expansion is completed, click '''Close''' to close it.</p>
<p>[[File:media/image96zero2w-img96.png]]</p></li>
<li><p>Then you can unplug the TF card and insert it into the development board to start. After entering the Linux system of the development board, if you use the '''df -h''' command, you can see that the size of the rootfs partition is consistent with the size set previously, which means it has been reduced capacity success</p>
<p>root@orangepi:~# '''df -h'''</p>
<div class="figure">
[[File:media/image102zero2w-img102.png]]
</div></li>
<li><p>The schematic diagram of the 24pin expansion board interface of the development board is as follows</p>
<p>[[File:media/image103zero2w-img103.png]]</p></li>
<li><p>The way to connect the expansion board to the development board is as follows. Please pay attention to the forward and reverse directions of the cable and do not plug it in backwards.</p>
<div class="figure">
[[File:media/image104zero2w-img104.png]]
</div></li>
<div class="figure">
[[File:media/image105zero2w-img105.png]]
</div></li></ol>
<ol style="list-style-type: decimal;">
<li><p>There are two LRADC buttons on the 24pin expansion board, and their locations are as shown in the figure below:</p>
<p>[[File:media/image106zero2w-img106.png]]</p></li>
<li><p>In the Linux system, the default key values of KEY1 and KEY2 are</p></li></ol>
<ol style="list-style-type: decimal;">
<li><p>There is no wired network interface on the main board of the development board. We can expand the 100M wired network interface through a 24pin expansion board.</p>
<p>[[File:media/image107zero2w-img107.png]]</p></li>
<li><p>Then plug one end of the network cable into the Ethernet interface of the expansion board, and the other end of the network cable into the router, and make sure the network is smooth.</p></li>
<li><p>After the system starts, it will automatically assign an IP address to the Ethernet card through '''DHCP''', '''and no other configuration is required.'''</p></li>
<div class="figure">
[[File:media/image108zero2w-img108.png]]
</div></li>
<p>orangepi@orangepi:~$ '''sudo nmtui'''</p></li>
<li><p>Enter the nmtui command to open the interface as shown below</p>
<p>[[File:media/image109zero2w-img109.png]]</p></li>
<li><p>Select '''Activate a connect''' and press Enter</p>
<p>[[File:media/image110zero2w-img110.png]]</p></li>
<li><p>Then you can see all the searched WIFI hotspots</p>
<div class="figure">
[[File:media/image111zero2w-img111.png]]
</div></li>
<div class="figure">
[[File:media/image112zero2w-img112.png]]
</div></li>
<div class="figure">
[[File:media/image113zero2w-img113.png]]
</div></li>
<div class="figure">
[[File:media/image114zero2w-img114.png]]
</div></li>
<ol style="list-style-type: decimal;">
<li><p>Click the network configuration icon in the upper right corner of the desktop (please do not connect the network cable when testing WIFI)</p>
<p>[[File:media/image115zero2w-img115.png]]</p></li>
<li><p>Click '''More networks''' in the pop-up drop-down box to see all scanned WIFI hotspots, and then select the WIFI hotspot you want to connect to.</p>
<p>[[File:media/image116zero2w-img116.png]]</p></li>
<li><p>Then enter the password of the WIFI hotspot and click '''Connect''' to start connecting to WIFI</p>
<p>[[File:media/image117zero2w-img117.png]]</p></li>
<li><p>After connecting to WIFI, you can open the browser to check whether you can access the Internet. The browser entrance is as shown below</p>
<p>[[File:media/image118zero2w-img118.png]]</p></li>
<li><p>If you can open other web pages after opening the browser, it means the WIFI connection is normal.</p>
<p>[[File:media/image119zero2w-img119.png]]</p></li></ol>
<span id="method-to-create-wifi-hotspot-through-create_ap"></span>
<div class="figure">
[[File:media/image120zero2w-img120.png]]
</div></li>
<div class="figure">
[[File:media/image121zero2w-img121.png]]
</div></li>
<div class="figure">
[[File:media/image121zero2w-img121.png]]
</div>
<div class="figure">
[[File:media/image122zero2w-img122.png]]
</div></li>
<div class="figure">
[[File:media/image121zero2w-img121.png]]
</div>
<div class="figure">
[[File:media/image122zero2w-img122.png]]
</div>
<div class="figure">
[[File:media/image123zero2w-img123.png]]
</div>
<div class="figure">
[[File:media/image120zero2w-img120.png]]
</div></li>
<div class="figure">
[[File:media/image121zero2w-img121.png]]
</div></li>
<div class="figure">
[[File:media/image121zero2w-img121.png]]
</div>
<div class="figure">
[[File:media/image122zero2w-img122.png]]
</div></li>
<div class="figure">
[[File:media/image123zero2w-img123.png]]
</div>
<p>orangepi@orangepi:~$ '''sudo nmtui'''</p></li>
<li><p>Then select '''Edit a connection''' and press the Enter key</p>
<p>[[File:media/image124zero2w-img124.png]]</p></li>
<li><p>Then select the network interface for which a static IP address needs to be set. For example, to set the static IP address of the '''Ethernet''' interface, select '''Wired connection 1'''.</p>
<p>[[File:media/image125zero2w-img125.png]]</p></li>
<li><p>Then select '''Edit''' via the '''Tab''' key and press the Enter key</p>
<p>[[File:media/image126zero2w-img126.png]]</p></li>
<li><p>Then use the Tab key to move the cursor to the '''&lt;Automatic&gt;''' position shown in the figure below to configure IPv4</p>
<p>[[File:media/image127zero2w-img127.png]]</p></li>
<li><p>Then press Enter, select '''Manual''' through the up and down arrow keys, and then press Enter to confirm.</p>
<p>[[File:media/image128zero2w-img128.png]]</p></li>
<li><p>The display after selection is as shown below</p>
<p>[[File:media/image129zero2w-img129.png]]</p></li>
<li><p>Then move the cursor to '''&lt;Show&gt;''' via the Tab key</p>
<p>[[File:media/image130zero2w-img130.png]]</p></li>
<li><p>Then press Enter. After pressing Enter, the following setting interface will pop up.</p>
<p>[[File:media/image131zero2w-img131.png]]</p></li>
<li><p>Then you can set the IP address (Addresses), gateway (Gateway) and DNS server address as shown in the figure below (there are many other setting options, please explore by yourself), please set according to your specific needs. The values set in the image below are just an example</p>
<p>[[File:media/image132zero2w-img132.png]]</p></li>
<li><p>After setting, move the cursor to '''&lt;OK&gt;''' in the lower right corner, and then press Enter to confirm.</p>
<p>[[File:media/image133zero2w-img133.png]]</p></li>
<li><p>Then click '''&lt;Back&gt;''' to return to the previous level selection interface</p>
<p>[[File:media/image134zero2w-img134.png]]</p></li>
<li><p>Then select '''Activate a connection''', then move the cursor to '''&lt;OK&gt;''', and finally click Enter</p>
<p>[[File:media/image135zero2w-img135.png]]</p></li>
<li><p>Then select the network interface that needs to be set, such as '''Wired connection 1''', then move the cursor to '''&lt;Deactivate&gt;''', and then press the Enter key to disable '''Wired connection 1'''</p>
<p>[[File:media/image136zero2w-img136.png]]</p></li>
<li><p>Then please do not move the cursor, and then press the Enter key to re-enable '''Wired connection 1''', so that the static IP address set previously will take effect.</p>
<p>[[File:media/image137zero2w-img137.png]]</p></li>
<li><p>Then you can exit nmtui through the '''&lt;Back&gt;''' and '''Quit''' buttons</p>
<p>[[File:media/image138zero2w-img138.png]] [[File:media/image139zero2w-img139.png]]</p></li>
<li><p>Then through '''ip a s eth0''' you can see that the IP address of the network port has become the static IP address set previously.</p>
<p>'''Note that in the following command, Debian12 needs to modify eth0 to end0.'''</p>
<ol start="3" style="list-style-type: decimal;">
<li><p>After successfully logging into the system, the display is as shown below</p>
<p>[[File:media/image140zero2w-img140.png]]</p>
<p>'''If ssh cannot log in to the Linux system normally, first check whether the IP address of the development board can be pinged. If there is no problem with pinging, you can log in to the Linux system through the serial port or HDMI display and enter the following command on the development board before trying again. Can it be connected?: '''</p></li></ol>
<div class="figure">
[[File:media/image141zero2w-img141.png]]
</div></li></ol>
<div class="figure">
[[File:media/image142zero2w-img142.png]]
</div></li>
<li><p>After successfully logging into the system, the display is as shown below</p>
<p>[[File:media/image143zero2w-img143.png]]</p></li></ol>
<span id="hdmi-test"></span>
<div class="figure">
[[File:media/image14zero2w-img14.png]]
</div></li>
<ol style="list-style-type: lower-alpha;">
<li><p>HDMI to VGA converter</p>
<p>[[File:media/image144zero2w-img144.png]]</p></li>
<li><p>A VGA cable and a Mini HDMI male to HDMI female adapter</p>
<p>[[File:media/image145zero2w-img145.png]] [[File:media/image146zero2w-img146.png]]</p></li>
<li><p>A monitor or TV that supports VGA interface</p></li></ol>
</li>
<li><p>HDMI to VGA display test is as follows</p>
<p>[[File:media/image147zero2w-img147.png]]</p>
<p>'''When using HDMI to VGA display, the development board and the Linux system of the development board do not need to make any settings. You only need the Mini HDMI interface of the development board to display normally. So if there is a problem with the test, please check whether there is a problem with the HDMI to VGA converter, VGA cable and monitor.'''</p></li></ol>
<li><p>The method of checking the HDMI output resolution is as follows. If the displayed resolution is the same as the set resolution, it means that the settings on the development board are correct.</p>
<p>orangepi@orangepi:~$ '''sudo cat /sys/class/disp/disp/attr/sys'''</p>
<p>[[File:media/image148zero2w-img148.png]]</p></li></ol>
<span id="how-to-modify-the-width-and-height-of-framebuffer-in-linux5.4-system"></span>
<ol style="list-style-type: decimal;">
<li><p>Click the Bluetooth icon in the upper right corner of the desktop</p>
<p>[[File:media/image149zero2w-img149.png]]</p></li>
<li><p>Then select the adapter</p>
<p>[[File:media/image150zero2w-img150.png]]</p></li>
<li><p>If prompted with the following interface, please select '''Yes'''.</p>
<p>[[File:media/image151zero2w-img151.png]]</p></li>
<li><p>Then set the '''Visibility Setting''' to '''Always visible''' in the Bluetooth adapter setting interface, and then turn it off.</p>
<p>[[File:media/image152zero2w-img152.png]]</p></li>
<li><p>Then open the configuration interface of the Bluetooth device</p>
<p>[[File:media/image153zero2w-img153.png]]</p></li>
<li><p>Click '''Search''' to start scanning for surrounding Bluetooth devices</p>
<p>[[File:media/image154zero2w-img154.png]]</p></li>
<li><p>Then select the Bluetooth device you want to connect, and then right-click the mouse to pop up the operation interface for the Bluetooth device. Select '''Pair''' to start pairing. The demonstration here is pairing with an Android phone.</p>
<p>[[File:media/image155zero2w-img155.png]]</p></li>
<li><p>When pairing, a pairing confirmation box will pop up in the upper right corner of the desktop. Just select '''Confirm''' to confirm. At this time, you also need to confirm on the mobile phone.</p>
<p>[[File:media/image156zero2w-img156.png]]</p></li>
<li><p>After pairing with the mobile phone, you can select the paired Bluetooth device, then right-click and select '''Send a File''' to start sending a picture to the mobile phone.</p>
<p>[[File:media/image157zero2w-img157.png]]</p></li>
<li><p>The interface for sending pictures is as follows</p>
<p>[[File:media/image158zero2w-img158.png]]</p></li></ol>
<span id="how-to-use-server-version-image"></span>
<div class="figure">
[[File:media/image159zero2w-img159.png]]
</div></li>
<div class="figure">
[[File:media/image159zero2w-img159.png]]
</div></li></ol>
As shown in the figure below, there are only two Type-C USB2.0 interfaces on the main board of the development board, which cannot directly connect USB Type-A mice, keyboards and other USB devices.
[[File:media/image160zero2w-img160.png]]
If you only purchased the motherboard and not the 24pin expansion board, you can prepare a Type-C to USB cable as shown in the figure below, plug one end of the Type-C interface into the Type-C interface of the motherboard, and then plug the other end into You can connect USB devices such as mouse and keyboard. If you feel that one USB interface is not enough, you can also expand multiple USB interfaces through USB Hub.
[[File:media/image24zero2w-img24.png]]
If you purchase a 24pin expansion board, you do not need a Type-C to USB cable, because the 24pin expansion board can expand two USB2.0 interfaces.
[[File:media/image107zero2w-img107.png]]
<span id="how-to-set-usb0-to-host-mode"></span>
As shown in the figure below, there are two Type-C interfaces on the main board of the development board: USB0 and USB1. Both of these interfaces can be used to power the development board, and they can also be used as USB2.0 HOST interfaces. The difference between USB0 and USB1 is that in addition to being set to HOST mode, USB0 can also be set to Device mode, while USB1 only has HOST mode
[[File:media/image160zero2w-img160.png]]
USB0 of the Linux system released by Orange Pi is set to Device mode by default, so when there is no need to use USB0 Device mode, it is recommended to use USB0 for power supply, so that USB1 can be used directly to connect USB devices
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li><li><p>Then use the keyboard’s keyboard's arrow keys to locate the location shown in &gt; the picture below, and then use the space to select '''usb0-host'''</p><p>[[File:media/image161zero2w-img161.png]]</p></li>
<li><p>Then select '''&lt;Save&gt;'''to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select '''&lt;Back&gt;'''</p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select '''&lt;Reboot&gt;'''to restart the system to make the &gt; configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li>
<li><p>After restarting, USB0 can use USB devices such as mouse and &gt; keyboard normally.</p></li></ol>
<div class="figure">
[[File:media/image162zero2w-img162.png]]
</div></li></ol>
<ol style="list-style-type: decimal;">
<li><p>There is no headphone interface on the main board of the development board. We can expand it through a 24pin expansion board.</p>
<p>[[File:media/image107zero2w-img107.png]]</p></li>
<li><p>Use the '''aplay -l''' command to view the sound card devices supported by the Linux system</p>
<ol style="list-style-type: lower-alpha;">
<ol style="list-style-type: decimal;">
<li><p>First open the file manager</p>
<p>[[File:media/image163zero2w-img163.png]]</p></li>
<li><p>Then find the following file (if there is no such audio file in the system, you can upload an audio file to the system yourself)</p>
<div class="figure">
[[File:media/image164zero2w-img164.png]]
</div></li>
<li><p>Then select the audio.wav file, right-click and select open with vlc to start playing.</p>
<p>[[File:media/image165zero2w-img165.png]]</p></li>
<li><p>How to switch between different audio devices such as HDMI playback and headphone playback</p>
<ol style="list-style-type: lower-alpha;">
<li><p>First open the volume control interface</p>
<p>[[File:media/image166zero2w-img166.png]]</p></li>
<li><p>When playing audio, the audio device options that can be used by &gt; the '''Playback''' software will be displayed in '''Playback''', &gt; as shown in the figure below. Here you can set which audio &gt; device needs to be played.</p>
<div class="figure">
[[File:media/image167zero2w-img167.png]]
</div></li></ol>
<ol style="list-style-type: decimal;">
<li><p>There is no infrared receiver on the main board of the development board. We can expand it through a 24pin expansion board.</p>
<p>[[File:media/image107zero2w-img107.png]]</p></li>
<li><p>Install ir-keytable infrared test software</p></li></ol>
<div class="figure">
[[File:media/image168zero2w-img168.png]]
</div></li>
<p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone2/temp'''</p>
<p>'''59273'''</p></li>
<li><p>sensor3: VE’s VE's temperature sensor. The first command is used to view &gt; the type of temperature sensor, and the second command is used to &gt; view the value of the temperature sensor.</p>
<p>orangepi@orangepi:~$ '''cat /sys/class/thermal/thermal_zone3/type'''</p>
<p>'''ve'''_thermal_zone</p>
<div class="figure">
[[File:media/image169zero2w-img169.png]]
</div></li>
'''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:media/image170zero2w-img170.png]]
'''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.'''
<p>orangepi@orangepi:~$ '''sudo apt install -y git'''</p>
<p>orangepi@orangepi:~$ '''git clone https://github.com/orangepi-xunlong/wiringOP.git -b next'''</p>
<p>'''Note that the source code needs to download the code of wiringOP next branch. Please don’t 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></li>
<li><p>Compile and install wiringOP</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:media/image170zero2w-img170.png]]</p></li></ol>
<span id="pin-interface-gpio-i2c-uart-spi-and-pwm-testing"></span>
<ol style="list-style-type: decimal;">
<li><p>The following uses pin No. 7 - corresponding to GPIO PI13 - corresponding to wPi serial number 2 - as an example to demonstrate how to set the high and low levels of the GPIO port.</p>
<p>[[File:media/image171zero2w-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>
<p>root@orangepi:~/wiringOP# '''gpio mode 2 out'''</p></li>
<ol style="list-style-type: decimal;">
<li><p>The following uses pin No. 7—corresponding to GPIO PI13—corresponding to wPi serial number 2—as an example to demonstrate how to set the pull-up and pull-down resistors of the GPIO port.</p>
<p>[[File:media/image171zero2w-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>
<p>root@orangepi:~/wiringOP# '''gpio mode 2 in'''</p></li>
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li>
<li><p>Then use the keyboard's arrow keys to locate the position shown &gt; in the figure below, and then use the '''space''' to select the &gt; dtbo configuration of the SPI you want to open.</p></li></ol>
</li></ol>
|}
[[File:media/image172zero2w-img172.png]]
<ol start="5" style="list-style-type: lower-alpha;">
<li><p>Then select '''&lt;Save&gt;''' to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select '''&lt;Back&gt;'''</p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select '''&lt;Reboot&gt;'''to restart the system to make the &gt; configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li></ol>
<!-- -->
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li><li><p>Then use the keyboard’s keyboard's arrow keys to locate the position shown &gt; in the picture below, and then use the '''space''' to select the &gt; corresponding i2c configuration in the picture below.</p></li></ol>
</li></ol>
|}
[[File:media/image173zero2w-img173.png]]
<ol start="5" style="list-style-type: lower-alpha;">
<li><p>Then select <span class="mark">&lt;Save&gt;</span> to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select '''&lt;Back&gt;'''</p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li></ol>
<!-- -->
<div class="figure">
[[File:media/image174zero2w-img174.png]]
</div></li></ol>
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li><li><p>Then use the keyboard’s keyboard's arrow keys to locate the position shown &gt; in the picture below, and then use the '''space''' to select the &gt; serial port you want to open.</p></li></ol>
</li></ol>
|}
[[File:media/image175zero2w-img175.png]]
<ol start="5" style="list-style-type: lower-alpha;">
<li><p>Then select '''&lt;Save&gt;''' to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select '''&lt;Back&gt;'''</p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li></ol>
<!-- -->
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li>
<li><p>Then use the keyboard's arrow keys to locate the position shown &gt; in the figure below, and then use the '''space''' to select the &gt; configuration corresponding to the pwm you want to open.</p>
<p>[[File:media/image176zero2w-img176.png]]</p></li>
<li><p>Then select '''&lt;Save&gt;''' to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select '''&lt;Back&gt;'''</p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li></ol>
</li>
<li><p>After restarting, you can start the PWM test</p>
<div class="figure">
[[File:media/image177zero2w-img177.png]]
</div>
'''Like wiringOP, wiringOP-Python can also determine which GPIO pin to operate by specifying the wPi number. Because there is no command to view the wPi number in wiringOP-Python, you can only view the board's wPi number and physics through the gpio command in wiringOP Correspondence of pins.'''
[[File:media/image170zero2w-img170.png]]
<ol style="list-style-type: decimal;">
<li><p>The following uses pin No. 7 - corresponding to GPIO PI13 - corresponding to wPi serial number 2 - as an example to demonstrate how to set the high and low levels of the GPIO port.</p>
<p>[[File:media/image171zero2w-img171.png]]</p></li>
<li><p>The steps for testing directly with commands are as follows:</p>
<ol style="list-style-type: lower-alpha;">
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li>
<li><p>Then use the keyboard's arrow keys to locate the position shown &gt; in the figure below, and then use the '''space''' to select the &gt; dtbo configuration of the SPI you want to open.</p></li></ol>
</li></ol>
<ol start="5" style="list-style-type: lower-alpha;">
<li><p>Then select '''&lt;Save&gt;''' to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select '''&lt;Back&gt;'''</p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li></ol>
<!-- -->
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li><li><p>Then use the keyboard’s keyboard's arrow keys to locate the position shown &gt; in the picture below, and then use the '''space''' to select the &gt; corresponding i2c configuration in the picture below.</p></li></ol>
</li></ol>
|}
[[File:media/image173zero2w-img173.png]]
<ol start="5" style="list-style-type: lower-alpha;">
<li><p>Then select <span class="mark">&lt;Save&gt;</span> to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select <span class="mark">&lt;Back&gt;</span></p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select <span class="mark">&lt;Reboot&gt;</span> to restart the system to make the &gt; configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li></ol>
<!-- -->
<p>orangepi@orangepi:~$ '''sudo''' '''apt-get install -y i2c-tools'''</p></li>
<li><p>Then connect an i2c device to the i2c pin of the 40pin connector. Here we take the DS1307 RTC module as an example.</p>
<p>[[File:media/image178zero2w-img178.png]]</p></li>
<li><p>Then use the '''i2cdetect -y x'''command. If the address of the connected i2c device can be detected, it means that the i2c device is connected correctly.</p>
<p>'''Note that x in the i2cdetect -y x command needs to be replaced with the serial number of the device node corresponding to the i2c bus.'''</p></li></ol>
[[File:media/image179zero2w-img179.png]]
<ol start="7" style="list-style-type: decimal;">
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li><li><p>Then use the keyboard’s keyboard's arrow keys to locate the position shown &gt; in the picture below, and then use the '''space''' to select the &gt; serial port you want to open.</p></li></ol>
</li></ol>
|}
[[File:media/image175zero2w-img175.png]]
<ol start="5" style="list-style-type: lower-alpha;">
<li><p>Then select '''&lt;Save&gt;''' to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select '''&lt;Back&gt;'''</p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the &gt; configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li></ol>
<!-- -->
<div class="figure">
[[File:media/image180zero2w-img180.png]]
</div></li>
<div class="figure">
[[File:media/image181zero2w-img181.png]]
</div></li>
<div class="figure">
[[File:media/image182zero2w-img182.png]]
</div></li>
<div class="figure">
[[File:media/image183zero2w-img183.png]]
</div></li>
<div class="figure">
[[File:media/image184zero2w-img184.png]]
</div></li>
<li><p>The main interface finally displayed by Home Assistant is as shown below</p>
<p>[[File:media/image185zero2w-img185.png]]</p></li>
<li><p>Method to stop Home Assistant container</p>
<ol style="list-style-type: lower-alpha;">
<div class="figure">
[[File:media/image180zero2w-img180.png]]
</div></li></ol>
<p>orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''</p></li>
<li><p>Then select '''zh_CN.UTF-8 UTF-8''' in the pop-up interface (use &gt; the up and down keys on the keyboard to move up and down, use &gt; the space bar to select, and finally use the Tab key to move &gt; the cursor to '''&lt;OK&gt;''', and then return Car can be used)</p>
<p>[[File:media/image186zero2w-img186.png]]</p></li>
<li><p>Then set the default '''locale''' to '''zh_CN.UTF-8'''</p>
<p>[[File:media/image187zero2w-img187.png]]</p></li>
<li><p>After exiting the interface, the '''locale''' setting will begin. &gt; The output displayed on the command line is as follows:</p>
<p>orangepi@orangepi:~$ '''sudo dpkg-reconfigure locales'''</p>
</li>
<li><p>Then open '''Input Method'''</p>
<p>[[File:media/image188zero2w-img188.png]]</p></li>
<li><p>Then select '''OK'''</p>
<p>[[File:media/image189zero2w-img189.png]]</p></li>
<li><p>Then select '''Yes'''</p>
<p>[[File:media/image190zero2w-img190.png]]</p></li>
<li><p>Then select '''fcitx'''</p>
<p>[[File:media/image191zero2w-img191.png]]</p></li>
<li><p>Then select '''OK'''</p>
<p>[[File:media/image192zero2w-img192.png]]</p></li>
<li><p>'''Then restart the Linux system to make the configuration take effect.'''</p></li>
<li><p>Then open '''Fcitx configuration'''</p>
<p>[[File:media/image193zero2w-img193.png]]</p></li>
<li><p>Then click the + sign as shown in the picture below</p>
<p>[[File:media/image194zero2w-img194.png]]</p></li>
<li><p>Then search '''Google Pinyin''' and click '''OK'''</p>
<div class="figure">
[[File:media/image195zero2w-img195.png]]
</div></li>
<li><p>Then put '''Google Pinyin''' on top</p>
<p>[[File:media/image196zero2w-img196.png]]</p><p>[[File:media/image197zero2w-img197.png]]</p></li>
<li><p>Then open the '''Geany''' editor to test the Chinese input method</p>
<p>[[File:media/image198zero2w-img198.png]]</p></li>
<li><p>The Chinese input method test is as follows</p>
<p>[[File:media/image199zero2w-img199.png]]</p></li>
<li><p>You can switch between Chinese and English input methods through the '''Ctrl+Space''' shortcut key</p></li>
<li><p>If you need the entire system to be displayed in Chinese, you can set all variables in '''/etc/default/locale''' to '''zh_CN.UTF-8'''</p>
<p>LANGUAGE='''zh_CN.UTF-8'''</p></li>
<li><p>Then '''restart the system''' and you will see that the system is displayed in Chinese.</p>
<p>[[File:media/image200zero2w-img200.png]]</p></li></ol>
<span id="installation-method-of-ubuntu-20.04-system"></span>
<ol style="list-style-type: decimal;">
<li><p>First open '''Language Support'''</p>
<p>[[File:media/image201zero2w-img201.png]]</p></li>
<li><p>Then find the '''Chinese (China)''' option</p>
<p>[[File:media/image202zero2w-img202.png]]</p></li>
<li><p>Then please use the left button of the mouse to select '''Chinese (China)''' and hold it down, then drag it up to the starting position. After dragging, the display will be as shown below:</p>
<p>[[File:media/image203zero2w-img203.png]]</p></li></ol>
'''Note that this step is not easy to drag, please be patient and try it a few times.'''
<ol start="4" style="list-style-type: decimal;">
<li><p>Then select '''Apply System-Wide''' to apply the Chinese settings to the entire system</p>
<p>[[File:media/image204zero2w-img204.png]]</p></li>
<li><p>Then set the '''Keyboard input method system''' system to '''fcitx'''</p>
<p>[[File:media/image205zero2w-img205.png]]</p></li>
<li><p>'''Then restart the Linux system to make the configuration take effect'''</p></li>
<li><p>After re-entering the system, please select '''Do not ask me again''' in the following interface, and then please decide according to your own preferences whether the standard folder should also be updated to Chinese</p>
<p>[[File:media/image206zero2w-img206.png]]</p></li>
<li><p>Then you can see that the desktop is displayed in Chinese</p>
<p>[[File:media/image207zero2w-img207.png]]</p></li>
<li><p>Then we can open '''Geany''' to test the Chinese input method. The opening method is as shown in the figure below</p>
<p>[[File:media/image208zero2w-img208.png]]</p></li>
<li><p>After opening '''Geany''', the English input method is still the default. We can switch to the Chinese input method through the '''Ctrl+Space''' shortcut key, and then we can input Chinese.</p>
<p>[[File:media/image209zero2w-img209.png]]</p></li></ol>
<span id="installation-method-of-ubuntu-22.04-system"></span>
<ol style="list-style-type: decimal;">
<li><p>First open '''Language Support'''</p>
<p>[[File:media/image201zero2w-img201.png]]</p></li>
<li><p>Then find the '''Chinese (China)''' option</p>
<p>[[File:media/image210zero2w-img210.png]]</p></li>
<li><p>Then please use the left button of the mouse to select '''Chinese (China)''' and hold it down, then drag it up to the starting position. After dragging, the display will be as shown below:</p>
<p>[[File:media/image211zero2w-img211.png]]</p></li></ol>
'''Note that this step is not easy to drag, please be patient and try it a few times.'''
<ol start="4" style="list-style-type: decimal;">
<li><p>Then select '''Apply System-Wide''' to apply the Chinese settings to the entire system</p>
<p>[[File:media/image212zero2w-img212.png]]</p></li>
<li><p>'''Then restart the Linux system to make the configuration take effect'''</p></li>
<li><p>After re-entering the system, please select '''Do not ask me again''' in the following interface, and then please decide whether the standard folder should also be updated to Chinese according to your own preferences.</p>
<p>[[File:media/image206zero2w-img206.png]]</p></li>
<li><p>Then you can see that the desktop is displayed in Chinese</p>
<p>[[File:media/image207zero2w-img207.png]]</p></li>
<li><p>Then open the Fcitx5 configuration program</p>
<p>[[File:media/image213zero2w-img213.png]]</p></li>
<li><p>Then choose to use Pinyin input method</p>
<div class="figure">
[[File:media/image214zero2w-img214.png]]
</div></li>
<li><p>The interface after selection is as shown below, then click OK</p>
<p>[[File:media/image215zero2w-img215.png]]</p></li>
<li><p>Then we can open '''Geany''' to test the Chinese input method. The opening method is as shown in the figure below</p>
<p>[[File:media/image208zero2w-img208.png]]</p></li>
<li><p>After opening '''Geany''', the English input method is still the default. We can switch to the Chinese input method through the '''Ctrl+Space''' shortcut key, and then we can enter Chinese.</p>
<p>[[File:media/image216zero2w-img216.png]]</p></li></ol>
<span id="how-to-remotely-log-in-to-the-linux-system-desktop"></span>
'''https://knowledgebase.nomachine.com/DT10R00166'''
'''NoMachine supports Windows, Mac, Linux, iOS and Android platforms, so we can remotely log in and control the Orange Pi development board through NoMachine on a variety of devices. The following demonstrates how to remotely log in to the Linux system desktop of the Orange Pi development board through NoMachine in Windows. For installation methods on other platforms, please refer to NoMachine’s NoMachine's official documentation.'''
'''Before operating, please make sure that the Windwos computer and the development board are in the same LAN, and that you can log in to the Ubuntu or Debian system of the development board through ssh normally.'''
[https://www.nomachine.com/download/download&id=112&s=ARM '''https://downloads.nomachine.com/download/?id=118&amp;distro=ARM''']
[[File:media/image217zero2w-img217.png]]
<ol start="2" style="list-style-type: lower-alpha;">
<li><p>In addition, you can also download the '''NoMachine''' installation &gt; package from the official tool.</p>
<p>[[File:media/image218zero2w-img218.png]]</p>
<p>First enter the '''remote login software-NoMachine''' folder</p>
<p>[[File:media/image219zero2w-img219.png]]</p>
<p>Then download the arm64 version of the deb installation package</p>
<p>[[File:media/image220zero2w-img220.png]]</p></li>
<li><p>Then upload the downloaded '''nomachine_x.x.x_x_arm64.deb''' to the &gt; Linux system of the development board</p></li>
<li><p>Then use the following command to install '''NoMachine''' in the Linux &gt; system of the development board</p>
'''https://downloads.nomachine.com/download/?id=9'''
[[File:media/image221zero2w-img221.png]]
<ol start="3" style="list-style-type: decimal;">
<li><p>Then install NoMachine in Windows. '''Please restart your computer after installation.'''</p></li>
<li><p>Then open '''NoMachine''' in Window</p>
<p>[[File:media/image222zero2w-img222.png]]</p></li>
<li><p>After NoMachine is started, it will automatically scan other devices with NoMachine installed on the LAN. After entering the main interface of NoMachine, you can see that the development board is already in the list of connectable devices, and then click on the location shown in the red box in the picture below You can now log in to the Linux system desktop of the development board.</p>
<p>[[File:media/image223zero2w-img223.png]]</p></li>
<li><p>Then click '''OK'''</p>
<p>[[File:media/image224zero2w-img224.png]]</p></li>
<li><p>Then enter the username and password of the development board Linux system in the corresponding positions in the figure below, and then click OK to start logging in.</p>
<p>[[File:media/image225zero2w-img225.png]]</p></li>
<li><p>Then click OK in the next interface.</p></li>
<li><p>Finally you can see the desktop of the development board Linux system</p>
<p>[[File:media/image226zero2w-img226.png]]</p></li></ol>
<span id="remote-login-using-vnc"></span>
<div class="figure">
[[File:media/image227zero2w-img227.png]]
</div>
<ol start="2" style="list-style-type: lower-alpha;">
<li><p>Then enter the VNC password set earlier</p>
<p>[[File:media/image228zero2w-img228.png]]</p></li>
<li><p>After successful login, the interface is displayed as shown below, &gt; and then you can remotely operate the desktop of the development &gt; board Linux system.</p></li></ol>
[[File:media/image229zero2w-img229.png]]
<span id="qt-installation-method"></span>
</li>
<li><p>Then you can see the QT Creator startup icon in '''Applications'''</p>
<p>[[File:media/image230zero2w-img230.png]]</p>
<p>You can also use the following command to open QT Creator</p>
<p>orangepi@orangepi:~$ '''qtcreator'''</p></li>
<li><p>The interface after QT Creator is opened is as follows</p>
<p>[[File:media/image231zero2w-img231.png]]</p></li>
<li><p>The version of QT Creator is as follows</p>
<ol style="list-style-type: lower-alpha;">
<li><p>The default version of QT Creator in '''Ubuntu20.04''' is as &gt; follows</p>
<p>[[File:media/image232zero2w-img232.png]]</p></li>
<li><p>The default version of QT Creator in '''Ubuntu22.04''' is as &gt; follows</p>
<p>[[File:media/image233zero2w-img233.png]]</p></li>
<li><p>The default version of QT Creator in '''Debian11''' is as follows</p>
<p>[[File:media/image234zero2w-img234.png]]</p></li>
<li><p>The default version of QT Creator in '''Debian12''' is as follows</p>
<p>[[File:media/image235zero2w-img235.png]]</p></li></ol>
</li>
<li><p>Then set up QT</p>
<ol style="list-style-type: lower-alpha;">
<li><p>First open '''Help'''-&gt;'''About Plugins...'''.</p>
<p>[[File:media/image236zero2w-img236.png]]</p></li>
<li><p>Then remove the check mark of '''ClangCodeModel'''</p>
<p>[[File:media/image237zero2w-img237.png]]</p></li>
<li><p>'''After setting up, you need to restart QT Creator'''</p></li>
<li><p>Then make sure the GCC compiler used by QT Creator. If the &gt; default is Clang, please change it to GCC.</p>
<p>'''Debian12 please skip this step.'''</p>
<p>[[File:media/image238zero2w-img238.png]]</p><p>[[File:media/image239zero2w-img239.png]]</p></li></ol>
</li>
<li><p>Then you can open a sample code</p>
<p>[[File:media/image240zero2w-img240.png]]</p></li>
<li><p>After clicking on the sample code, the corresponding instruction document will automatically open. You can read the instructions carefully.</p>
<p>[[File:media/image241zero2w-img241.png]]</p></li>
<li><p>Then click '''Configure Project'''</p>
<p>[[File:media/image242zero2w-img242.png]]</p></li>
<li><p>Then click the green triangle in the lower left corner to compile and run the sample code</p>
<p>[[File:media/image243zero2w-img243.png]]</p></li>
<li><p>After waiting for a period of time, the interface shown in the figure below will pop up, which means that QT can compile and run normally.</p>
<p>[[File:media/image244zero2w-img244.png]]</p></li>
<li><p>References</p>
<p>[https://wiki.qt.io/Install_Qt_5_on_Ubuntu '''https://wiki.qt.io/Install_Qt_5_on_Ubuntu''']</p>
# The currently active version of ROS 1 is as follows, the recommended version is '''Noetic Ninjemys'''
[[File:media/image245zero2w-img245.png]]
[[File:media/image246zero2w-img246.png]]
[http://docs.ros.org/ '''http://docs.ros.org''']
<li><p>In the official installation documentation of ROS '''Noetic Ninjemys''', Ubuntu recommends using Ubuntu20.04, so please ensure that the system used by the development board is '''Ubuntu20.04 desktop system'''.</p>
<p>[http://wiki.ros.org/noetic/Installation '''http://wiki.ros.org/noetic/Installation''']</p>
<p>[[File:media/image247zero2w-img247.png]]</p></li>
<li><p>Then use the script below to install ros1</p>
<p>orangepi@orangepi:~$ '''install_ros.sh ros1'''</p></li>
<p>orangepi@orangepi:~$ '''test_ros.sh'''</p></li>
<li><p>After running the '''test_ros.sh''' script, a small turtle as shown in the picture below will pop up.</p>
<p>[[File:media/image248zero2w-img248.png]]</p></li>
<li><p>Then please keep the terminal window you just opened at the top</p></li></ol>
<div class="figure">
[[File:media/image249zero2w-img249.png]]
</div>
<ol start="9" style="list-style-type: decimal;">
<li><p>At this time, press the direction keys on the keyboard to control the little turtle to move up, down, left, and right.</p>
<p>[[File:media/image250zero2w-img250.png]]</p></li></ol>
<span id="how-to-install-ros-2-galactic-on-ubuntu20.04"></span>
<ol style="list-style-type: decimal;">
<li><p>The currently active version of ROS 2 is as follows, the recommended version is '''Galactic Geochelone'''</p>
<p>[[File:media/image251zero2w-img251.png]]</p><p>[[File:media/image252zero2w-img252.png]]</p>
<p>[http://docs.ros.org/ '''http://docs.ros.org''']</p>
<p>'''http://docs.ros.org/en/galactic/Releases.html'''</p></li>
<p>orangepi@orangepi:~$ '''source /opt/ros/galactic/setup.bash'''</p>
<p>orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''</p>
<p>[[File:media/image253zero2w-img253.png]]</p></li>
<li><p>For how to use ROS, please refer to the documentation of ROS 2.</p>
<p>[http://docs.ros.org/en/galactic/Tutorials.html '''http://docs.ros.org/en/galactic/Tutorials.html''']</p></li></ol>
<p>orangepi@orangepi:~$ '''source /opt/ros/humble/setup.bash'''</p>
<p>orangepi@orangepi:~$ '''ros2 run rviz2 rviz2'''</p>
<p>[[File:media/image254zero2w-img254.png]]</p></li>
<li><p>Reference documentation</p>
<p>'''http://docs.ros.org/en/humble/index.html'''</p>
<div class="figure">
[[File:media/image255zero2w-img255.png]]
</div></li>
<div class="figure">
[[File:media/image256zero2w-img256.png]]
</div>
<ol start="5" style="list-style-type: decimal;">
<li><p>Then choose to '''save the password''' and click '''OK'''</p>
<p>[[File:media/image257zero2w-img257.png]]</p></li>
<li><p>Then select '''Always trust this host''' and click '''OK'''</p></li></ol>
<div class="figure">
[[File:media/image258zero2w-img258.png]]
</div>
<div class="figure">
[[File:media/image259zero2w-img259.png]]
</div>
<div class="figure">
[[File:media/image260zero2w-img260.png]]
</div>
<ol start="9" style="list-style-type: decimal;">
<li><p>After the upload is completed, you can go to the corresponding path in the development board Linux system to view the uploaded file.</p></li>
<li><p>The method of uploading a folder is the same as the method of uploading a file, so I won’t won't go into details here.</p></li></ol>
<span id="method-to-upload-files-from-windows-pc-to-development-board-linux-system"></span>
[https://filezilla-project.org/download.php?type=client '''https://filezilla-project.org/download.php?type=client''']
[[File:media/image261zero2w-img261.png]]
<div class="figure">
[[File:media/image262zero2w-img262.png]]
</div>
<div class="figure">
[[File:media/image263zero2w-img263.png]]
</div>
<div class="figure">
[[File:media/image264zero2w-img264.png]]
</div>
<div class="figure">
[[File:media/image256zero2w-img256.png]]
</div>
<div class="figure">
[[File:media/image265zero2w-img265.png]]
</div>
<div class="figure">
[[File:media/image266zero2w-img266.png]]
</div>
<div class="figure">
[[File:media/image267zero2w-img267.png]]
</div>
<div class="figure">
[[File:media/image268zero2w-img268.png]]
</div>
<ol start="9" style="list-style-type: decimal;">
<li><p>After the upload is completed, you can go to the corresponding path in the development board Linux system to view the uploaded file.</p></li>
<li><p>The method of uploading a folder is the same as the method of uploading a file, so I won’t won't go into details here.</p></li></ol>
<span id="instructions-for-using-the-logo-on-and-off-the-machine"></span>
There is no power on/off button on the main board of the development board. We can expand it through a 24pin expansion board. The location of the power on/off button on the expansion board is as follows:
[[File:media/image269zero2w-img269.png]]
The power on/off button of the Linux 6.1 image is turned on by default, but the power on/off button of the Linux 5.4 kernel image is turned off by default and needs to be turned on manually for normal use. The steps are as follows:
<p>orangepi@orangepi:~$ '''sudo orangepi-config'''</p></li>
<li><p>Then select '''System'''</p>
<p>[[File:media/image80zero2w-img80.png]]</p></li>
<li><p>Then select '''Hardware'''</p>
<p>[[File:media/image81zero2w-img81.png]]</p></li>
<li><p>Then use the keyboard's arrow keys to locate the position shown in the picture below, and then use the '''space''' to select the dtbo configuration of the SPI you want to open.</p>
<p>[[File:media/image270zero2w-img270.png]]</p></li>
<li><p>Then select '''&lt;Save&gt;''' to save</p>
<p>[[File:media/image83zero2w-img83.png]]</p></li>
<li><p>Then select '''&lt;Back&gt;'''</p>
<p>[[File:media/image84zero2w-img84.png]]</p></li>
<li><p>Then select '''&lt;Reboot&gt;''' to restart the system to make the configuration take effect.</p>
<p>[[File:media/image85zero2w-img85.png]]</p></li></ol>
<span id="how-to-shut-down-and-restart-the-development-board"></span>
<p>'''Note that after turning off the development board, you need to unplug and replug the power supply before it can be turned on.'''</p></li>
<li><p>In addition to using the poweroff command to shut down, you can also use the power on/off button on the expansion board to shut down.</p>
<p>[[File:media/image269zero2w-img269.png]]</p>
<p>'''Note that Linux 5.4 requires manual configuration of the power on/off button before it can be used. For the opening method, please refer to the method of opening the power button in Linux5.4.'''</p></li>
<li><p>Use the '''reboot''' command to restart the Linux system in the development board</p>
<li>Note that the Ubuntu version needs to be switched to 22.04.</li></ol>
[[File:media/image271zero2w-img271.png]]
<ol start="3" style="list-style-type: lower-alpha;">
<div class="figure">
[[File:media/image272zero2w-img272.png]]
</div>
<div class="figure">
[[File:media/image273zero2w-img273.png]]
</div>
<div class="figure">
[[File:media/image274zero2w-img274.png]]
</div>
<li>Then select the model of the development board</li></ol>
[[File:media/image275zero2w-img275.png]]
<ol start="4" style="list-style-type: decimal;">
<li><p>The current branch will compile the u-boot v2018.05 version code that needs to be used by the linux5.4 image.</p></li>
<li><p>The next branch will compile the u-boot v2021.07 version code that needs to be used by the linux6.1 image.</p>
<p>[[File:media/image276zero2w-img276.png]]</p></li></ol>
</li>
<li><p>If you select the next branch, you will also be prompted to select the memory size, and you do not need to select the current branch.</p></li></ol>
b. If the development board you purchased has 1GB or 2GB or 4GB memory size, please choose the second option.
</blockquote>
[[File:media/image277zero2w-img277.png]]
<ol start="6" style="list-style-type: decimal;">
<li>Then select '''5 Install/Update the bootloader on SD/eMMC'''</li></ol>
[[File:media/image278zero2w-img278.png]]
<ol start="5" style="list-style-type: lower-alpha;">
<li>After pressing the Enter key, a Warning will pop up first.</li></ol>
[[File:media/image279zero2w-img279.png]]
<ol start="6" style="list-style-type: lower-alpha;">
<li>Press the Enter key again to start updating u-boot. After the update is completed, the following information will be displayed.</li></ol>
[[File:media/image280zero2w-img280.png]]
<ol start="7" style="list-style-type: lower-alpha;">
<div class="figure">
[[File:media/image281zero2w-img281.png]]
</div>
<li>Then you will be prompted whether you need to display the kernel configuration interface. If you do not need to modify the kernel configuration, select the first one. If you need to modify the kernel configuration, select the second one.</li></ol>
[[File:media/image282zero2w-img282.png]]
<ol start="4" style="list-style-type: decimal;">
<li>Then select the model of the development board</li></ol>
[[File:media/image275zero2w-img275.png]]
<ol start="5" style="list-style-type: decimal;">
b. The next branch will compile the linux6.1 kernel source code
</blockquote>
[[File:media/image276zero2w-img276.png]]
<ol start="6" style="list-style-type: decimal;">
<li>If you choose to display the kernel configuration menu (the second option) in step 3), the kernel configuration interface opened through '''make menuconfig''' will pop up. At this time, you can directly modify the kernel configuration. After modification, save and exit. Yes, compilation of the kernel source code will begin after exiting.</li></ol>
[[File:media/image283zero2w-img283.png]]
<ol style="list-style-type: lower-alpha;">
<li><p>If the following error is prompted when compiling the kernel, it is because the Ubuntu PC terminal interface is too small, causing the make menuconfig interface to be unable to be displayed. Please increase the Ubuntu PC terminal to the maximum size, and then rerun the build.sh script.</p></li></ol>
[[File:media/image284zero2w-img284.png]]
<ol start="7" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image285zero2w-img285.png]]
</div>
<li>Then select the model of the development board</li></ol>
[[File:media/image275zero2w-img275.png]]
<ol start="4" style="list-style-type: decimal;">
</li></ol>
[[File:media/image276zero2w-img276.png]]
<ol start="5" style="list-style-type: decimal;">
<li>Then select the type of rootfs</li></ol>
[[File:media/image286zero2w-img286.png]]
<ol start="6" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image287zero2w-img287.png]]
</div>
<div class="figure">
[[File:media/image288zero2w-img288.png]]
</div>
<li>If you are compiling a desktop version of the image, you also need to select the type of desktop environment. Currently, only XFCE is maintained, so please select an XFCE type desktop.</li></ol>
[[File:media/image289zero2w-img289.png]]
[[File:media/image290zero2w-img290.png]]
You can then select additional packages that need to be installed. Please press the Enter key here to skip directly.
[[File:media/image291zero2w-img291.png]]
<ol start="9" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image292zero2w-img292.png]]
</div>
<li>Then select the model of the development board</li></ol>
[[File:media/image275zero2w-img275.png]]
<ol start="4" style="list-style-type: decimal;">
</li></ol>
[[File:media/image276zero2w-img276.png]]
<ol start="5" style="list-style-type: decimal;">
<li><p>If the development board you purchased has a memory size of 1.5GB, please select the first option.</p></li>
<li><p>If the development board you purchased has 1GB or 2GB or 4GB memory size, please choose the second option.</p>
<p>[[File:media/image277zero2w-img277.png]]</p></li></ol>
</li>
<li><p>Then select the type of rootfs</p></li></ol>
[[File:media/image286zero2w-img286.png]]
<ol start="7" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image287zero2w-img287.png]]
</div>
<div class="figure">
[[File:media/image288zero2w-img288.png]]
</div>
<li>If you are compiling a desktop version of the image, you also need to select the type of desktop environment. Currently, only XFCE is maintained, so please select an XFCE type desktop.</li></ol>
[[File:media/image289zero2w-img289.png]]
[[File:media/image290zero2w-img290.png]]
You can then select additional packages that need to be installed. Please press the Enter key here to skip directly.
[[File:media/image291zero2w-img291.png]]
<ol start="10" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image293zero2w-img293.png]]
</div></li>
<div class="figure">
[[File:media/image294zero2w-img294.png]]
</div></li>
<div class="figure">
[[File:media/image295zero2w-img295.png]]
</div></li>
<div class="figure">
[[File:media/image296zero2w-img296.png]]
</div></li>
<div class="figure">
[[File:media/image297zero2w-img297.png]]
</div></li>
<div class="figure">
[[File:media/image298zero2w-img298.png]]
</div></li>
<div class="figure">
[[File:media/image299zero2w-img299.png]]
</div></li>
<div class="figure">
[[File:media/image300zero2w-img300.png]]
</div></li>
<div class="figure">
[[File:media/image301zero2w-img301.png]]
</div></li>
<div class="figure">
[[File:media/image302zero2w-img302.png]]
</div>
If you have purchased the infrared remote control (other remote controls do not work) and a 24pin expansion board that come with the development board, after connecting the 24pin expansion board to the development board, you can also use the return key on the remote control to return to the previous menu. The location of the return key is as shown below. Shown:
[[File:media/image303zero2w-img303.png]]
<span id="how-to-use-adb"></span>
# Prepare a USB Type C interface data cable, plug one end of the USB interface into the USB interface of the computer, and plug one end of the USB Type C interface into the USB0 interface of the development board (see the description of the picture on the right below for the location of USB0). In this case, the development board is powered by the computer's USB interface, so please ensure that the computer's USB interface can provide the most sufficient power to drive the development board.
[[File:media/image304zero2w-img304.png]] [[File:media/image305zero2w-img305.png]]
<ol start="2" style="list-style-type: decimal;">
<ol style="list-style-type: decimal;">
<li><p>Enter first '''Settings'''</p>
<p>[[File:media/image306zero2w-img306.png]]</p></li>
<li><p>Then select '''Device Preferences'''</p>
<p>[[File:media/image307zero2w-img307.png]]</p></li>
<li><p>Then select '''Display &amp; Sound'''</p>
<p>[[File:media/image308zero2w-img308.png]]</p></li>
<li><p>Then select '''Advanced display settings'''</p>
<p>[[File:media/image309zero2w-img309.png]]</p></li>
<li><p>Then select '''HDMI output mode'''</p>
<p>[[File:media/image310zero2w-img310.png]]</p></li>
<li><p>Then you can see the list of resolutions supported by the monitor. At this time, clicking the corresponding option will switch to the corresponding resolution. Please note that different monitors may support different resolutions. If you connect it to a TV, you will generally see more resolution options than the picture below.</p>
<p>[[File:media/image311zero2w-img311.png]]</p></li>
<li><p>The HDMI output of the development board supports 4K display. When connected to a 4K TV, you can see the 4K resolution option.</p>
<p>[[File:media/image312zero2w-img312.png]]</p></li></ol>
<span id="hdmi-to-vga-display-test-1"></span>
</li></ol>
[[File:media/image144zero2w-img144.png]]
<ol start="2" style="list-style-type: lower-alpha;">
<li>A VGA cable and a Mini HDMI male to HDMI female adapter</li></ol>
[[File:media/image145zero2w-img145.png]] [[File:media/image146zero2w-img146.png]]
<ol start="3" style="list-style-type: lower-alpha;">
<li>HDMI to VGA display test is as follows</li></ol>
[[File:media/image313zero2w-img313.png]]
'''When using HDMI to VGA display, the development board and the Android system of the development board do not need to make any settings. You only need the Mini HDMI interface of the development board to display normally. So if there is a problem with the test, please check whether there is a problem with the HDMI to VGA converter, VGA cable and monitor.'''
# Choose first '''Settings'''
[[File:media/image306zero2w-img306.png]]
<ol start="2" style="list-style-type: decimal;">
<li>Then select '''Network &amp; Internet'''</li></ol>
[[File:media/image314zero2w-img314.png]]
<ol start="3" style="list-style-type: decimal;">
<li>Then turn on WI-FI</li></ol>
[[File:media/image315zero2w-img315.png]]
<ol start="4" style="list-style-type: decimal;">
<li>After turning on WI-FI, you can see the searched signals under '''Available networks'''.</li></ol>
[[File:media/image316zero2w-img316.png]]
<ol start="5" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image317zero2w-img317.png]]
</div>
<div class="figure">
[[File:media/image318zero2w-img318.png]]
</div>
<li>The display after successful WI-FI connection is as shown below</li></ol>
[[File:media/image319zero2w-img319.png]]
<span id="how-to-use-wi-fi-hotspot"></span>
# Then select '''Settings'''
[[File:media/image306zero2w-img306.png]]
<ol start="3" style="list-style-type: decimal;">
<li>Then select '''Network &amp; Internet'''</li></ol>
[[File:media/image314zero2w-img314.png]]
<ol start="4" style="list-style-type: decimal;">
<li>Then select '''WIFI hotspot'''</li></ol>
[[File:media/image320zero2w-img320.png]]
<ol start="5" style="list-style-type: decimal;">
<li>Then open '''Hotspot Enable'''. You can also see the name and password of the generated hotspot in the picture below. Remember them and use them when connecting to the hotspot (if you need to modify the name and password of the hotspot, you need to close Hotspot Enable first. Then you can modify it)</li></ol>
[[File:media/image321zero2w-img321.png]]
<ol start="6" style="list-style-type: decimal;">
<li>At this time, you can take out your mobile phone. If everything is normal, you can find the WIFI hotspot with the same name ('''here AndroidAP_7132''') shown under the '''Hotspot name''' in the picture above in the WI-FI list searched by the mobile phone. Then you can click AndroidAP_7132 to connect to the hotspot. The password can be seen under the '''Hotspot password''' in the picture above.</li></ol>
[[File:media/image322zero2w-img322.png]]
<ol start="7" style="list-style-type: decimal;">
<li>After the connection is successful, it will be displayed as shown below (the interface will be different on different mobile phones, the specific interface is subject to the one displayed on your mobile phone). At this time, you can open a web page on your mobile phone to see if you can access the Internet. If the web page can be opened normally, it means that the '''WI-FI Hotspot''' of the development board can be used normally.</li></ol>
[[File:media/image323zero2w-img323.png]]
<span id="how-to-check-the-ip-address-of-the-ethernet-port"></span>
# There is no wired network interface on the main board of the development board. We can expand the 100M Ethernet through a 24pin expansion board.
[[File:media/image107zero2w-img107.png]]
<ol start="2" style="list-style-type: decimal;">
<li><p>Then make sure the network port of the expansion board is connected to the router or switch</p></li>
<li><p>Then open '''Settings'''</p>
<p>[[File:media/image324zero2w-img324.png]]</p></li>
<li><p>Then select '''Network &amp; Internet'''</p>
<p>[[File:media/image325zero2w-img325.png]]</p></li><li><p>Then you can see the IP address of the development board’s board's wired network port at the location shown in the picture below.</p><p>[[File:media/image326zero2w-img326.png]]</p></li></ol>
<span id="bluetooth-connection-method"></span>
# Choose first '''Settings'''
[[File:media/image306zero2w-img306.png]]
<ol start="2" style="list-style-type: decimal;">
<li>Then select '''Bluetooth'''</li></ol>
[[File:media/image327zero2w-img327.png]]
<ol start="3" style="list-style-type: decimal;">
<li>Then Open '''Bluetooth Enable'''</li></ol>
[[File:media/image328zero2w-img328.png]]
<ol start="4" style="list-style-type: decimal;">
<li>Then click '''Pair new device'''to start scanning for surrounding Bluetooth devices</li></ol>
[[File:media/image329zero2w-img329.png]]
<ol start="5" style="list-style-type: decimal;">
<li>The searched Bluetooth devices will be displayed under '''Available devices'''</li></ol>
[[File:media/image330zero2w-img330.png]]
<ol start="6" style="list-style-type: decimal;">
<li>Then click on the Bluetooth device you want to connect to start pairing. When the following interface pops up, please use the mouse to select the '''Pair'''option</li></ol>
[[File:media/image331zero2w-img331.png]]
<ol start="7" style="list-style-type: decimal;">
<li>What is tested here is the Bluetooth configuration process between the development board and the Android phone. At this time, the following confirmation interface will pop up on the phone. Click the pairing button on the phone to start the pairing process.</li></ol>
[[File:media/image332zero2w-img332.png]]
<ol start="8" style="list-style-type: decimal;">
<li>After pairing is completed, open '''Paired devices''' and you will see the paired Bluetooth devices.</li></ol>
[[File:media/image333zero2w-img333.png]]
<ol start="9" style="list-style-type: decimal;">
<li>At this time, you can use the Bluetooth of your mobile phone to send a picture to the development board. After sending, you can see the following confirmation interface in the Android system of the development board, and then click '''Accept''' to start receiving the pictures sent by the mobile phone.</li></ol>
[[File:media/image334zero2w-img334.png]]
<ol start="10" style="list-style-type: decimal;">
<li>Pictures received by the Bluetooth system of the development board Android system can be viewed in '''Received files'''.</li></ol>
[[File:media/image335zero2w-img335.png]]
<span id="how-to-set-usb0-to-host-mode-1"></span>
As shown in the figure below, there are two Type-C interfaces on the motherboard of the development board: USB0 and USB1. Both of these interfaces can be used to power the development board, and they can also be used as USB2.0 HOST interfaces. The difference between USB0 and USB1 is that in addition to being set to HOST mode, USB0 can also be set to Device mode, while USB1 only has HOST mode.
[[File:media/image160zero2w-img160.png]]
USB0 of the Android12 TV system released by Orange Pi is set to Device mode by default, so when there is no need to use USB0 Device mode (ADB function needs to ensure that USB0 is in Device mode), it is recommended to use USB0 for power supply, so that USB1 can be directly used to connect USB devices .
<div class="figure">
[[File:media/image336zero2w-img336.png]]
</div>
<div class="figure">
[[File:media/image337zero2w-img337.png]]
</div>
<li>After installation, you can see the startup icon of the USB camera on the Android desktop.</li></ol>
[[File:media/image338zero2w-img338.png]]
<ol start="7" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image336zero2w-img336.png]]
</div>
<div class="figure">
[[File:media/image339zero2w-img339.png]]
</div>
<li>After installation, you can see the startup icon of the ROOT test tool on the Android desktop.</li></ol>
[[File:media/image340zero2w-img340.png]]
<ol start="5" style="list-style-type: decimal;">
<li>The display interface after opening the '''ROOT test tool''' for the first time is as shown below</li></ol>
[[File:media/image341zero2w-img341.png]]
<ol start="6" style="list-style-type: decimal;">
<li>Then you can click '''CHECK NOW''' to start checking the ROOT status of the Android system. After the check is completed, the display is as follows. You can see that the Android system has obtained ROOT permissions.</li></ol>
[[File:media/image342zero2w-img342.png]]
<span id="how-to-use-miracastreceiver-to-cast-the-mobile-phone-screen-to-the-development-board"></span>
<li><p>First, please make sure that both the development board and the mobile phone are connected to the same WIFI hotspot. For the method of connecting the development board to WIFI, please refer to '''the instructions in the WI-FI connection method.'''</p></li>
<li><p>Then open the '''MiracastReceiver'''application in the Android system of the development board</p>
<p>[[File:media/image343zero2w-img343.png]]</p></li>
<li><p>The interface after '''MiracastReceiver''' is opened is as follows</p>
<div class="figure">
[[File:media/image344zero2w-img344.png]]
</div></li>
<li><p>Then find the screen mirroring function in the phone settings. Here we take '''Xiaomi 12S Pro mobile phone''' as an example. Please research other brands of mobile phones by yourself. As shown in the picture below, click the button in the red box to open the screen mirroring function of the phone.</p>
<p>[[File:media/image345zero2w-img345.png]]</p></li>
<li><p>After waiting for a period of time, you will be able to see the searched connectable devices on your mobile phone, and then we can select the device corresponding to the development board to connect.</p>
<p>[[File:media/image346zero2w-img346.png]]</p></li>
<li><p>Then the selection box shown in the figure below will pop up in the '''MiracastReceiver''' application interface of the development board. Here we can select '''Accept'''</p>
<p>[[File:media/image347zero2w-img347.png]]</p></li>
<li><p>Then you can see the content of the mobile phone screen on the HDMI screen connected to the development board</p>
<p>[[File:media/image348zero2w-img348.png]]</p></li></ol>
<span id="method-of-turning-on-and-off-the-machine-through-buttons-or-infrared-remote-control"></span>
We can turn off or turn on the Android system of the development board through the power on/off button or infrared remote control. However, it should be noted that there is no power on/off button and infrared receiver on the main board of the development board, and it needs to be expanded through a 24pin expansion board.
[[File:media/image107zero2w-img107.png]]
The location of the power button on the 24pin expansion board is as shown in the figure below:
[[File:media/image269zero2w-img269.png]]
The location of the infrared remote control power button is as follows:
[[File:media/image349zero2w-img349.png]]
When shutting down, we need to press and hold the power button or the power button on the infrared remote control, and then the Android system will pop up the confirmation dialog box shown in the figure below, and then select '''OK''' to shut down the Android system.
[[File:media/image350zero2w-img350.png]]
After shutting down, press and hold the power button or the power button on the infrared remote control again to turn it on.
# First open wiringOP APP on the desktop
[[File:media/image351zero2w-img351.png]]
<ol start="2" style="list-style-type: decimal;">
<li>Then click the '''GPIO_TEST''' button to open the GPIO test interface</li></ol>
[[File:media/image352zero2w-img352.png]]
<ol start="3" style="list-style-type: decimal;">
<li>The GPIO test interface is as shown in the figure below. The two rows of '''CheckBox''' buttons on the left have a one-to-one correspondence with the 40pin pins. When the '''CheckBox''' button is checked, the corresponding GPIO pin will be set to '''OUT''' mode and the pin level is set to high level; when unchecked, the GPIO pin level will be set to low level; when the GPIO is clicked When you click the '''GPIO READALL''' button, you can get information such as wPi number, GPIO mode, pin level, etc.; when you click the'''BLINK ALL GPIO''' button, all GPIO ports will cycle through outputting high and low levels. This function can be used to test all the 40pin pins. GPIO port.</li></ol>
[[File:media/image353zero2w-img353.png]]
<ol start="4" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image354zero2w-img354.png]]
</div>
<li>There are a total of 28 GPIO ports available in the 40-pin development board. The following takes pin 12 - corresponding to GPIO PI01 - corresponding to wPi serial number 6 - as an example to demonstrate how to set the high and low levels of the GPIO port. First click the '''CheckBox''' button corresponding to pin 12. When the button is selected, pin 12 will be set to high level. After setting, you can use a multimeter to measure the value of the voltage of the pin. If it is '''3.3v''', it means the setting High level success.</li></ol>
[[File:media/image355zero2w-img355.png]]
<ol start="6" style="list-style-type: decimal;">
<li>Then click the '''GPIO READALL''' button and you can see that the current pin 12 mode is '''OUT''' and the pin level is high level.</li></ol>
[[File:media/image356zero2w-img356.png]]
<ol start="7" style="list-style-type: decimal;">
<li>Click the '''CheckBox''' button in the picture below again to uncheck it, and pin 12 will be set to 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 setting is successful.</li></ol>
[[File:media/image357zero2w-img357.png]]
<ol start="8" style="list-style-type: decimal;">
<li>Then click the '''GPIO READALL''' button and you can see that the current pin 12 mode is OUT and the pin level is low level.</li></ol>
[[File:media/image358zero2w-img358.png]]
<span id="pin-uart-test-method"></span>
<li>First open wiringOP APP on the desktop</li></ol>
[[File:media/image351zero2w-img351.png]]
<ol start="4" style="list-style-type: decimal;">
<li>Then click the '''UART_TEST'''button to open the UART test interface</li></ol>
[[File:media/image359zero2w-img359.png]]
<ol start="5" style="list-style-type: decimal;">
<li>The serial port test interface of wiringOP is as shown in the figure below</li></ol>
[[File:media/image360zero2w-img360.png]]
<ol start="6" style="list-style-type: decimal;">
<li><p>Then select the '''/dev/ttyAS2''' or'''/dev/ttyAS5''' node in the selection box</p>
<p>[[File:media/image361zero2w-img361.png]]</p></li>
<li><p>Enter the baud rate you want to set in the edit box, and then click the '''OPEN''' button to open the uart node. After the opening is successful, the '''OPEN''' button becomes unselectable, and the '''CLOSE''' button and '''SEND''' button become selectable.</p></li></ol>
[[File:media/image362zero2w-img362.png]]
<ol start="8" style="list-style-type: decimal;">
<li><p>Then you can enter a paragraph of characters in the send edit box below and click the '''SEND''' button to start sending.</p></li></ol>
[[File:media/image363zero2w-img363.png]]
<ol start="10" style="list-style-type: decimal;">
<li>If everything is normal, the received string will be displayed in the receiving box</li></ol>
[[File:media/image364zero2w-img364.png]]
<span id="pin-spi-test-method"></span>
<li>Then open wiringOP APP on the desktop</li></ol>
[[File:media/image351zero2w-img351.png]]
<ol start="5" style="list-style-type: decimal;">
<li>Then click the '''SPI_TEST''' button to open the SPI test interface</li></ol>
[[File:media/image365zero2w-img365.png]]
<ol start="6" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image366zero2w-img366.png]]
</div></li>
<li><p>Then click the '''OPEN''' button to initialize the SPI</p></li></ol>
[[File:media/image367zero2w-img367.png]]
<ol start="8" style="list-style-type: decimal;">
<li>Then fill in the bytes that need to be sent, such as reading the ID information of the onboard SPIFlash, filling in the address 0x9f in data[0], and then click the '''TRANSFER''' button</li></ol>
[[File:media/image368zero2w-img368.png]]
<ol start="9" style="list-style-type: decimal;">
<li>Finally, the APP will display the read ID information of the onboard SPI Flash.</li></ol>
[[File:media/image369zero2w-img369.png]]
<ol start="10" style="list-style-type: decimal;">
<li>First open wiringOP APP on the desktop</li></ol>
[[File:media/image351zero2w-img351.png]]
<ol start="4" style="list-style-type: decimal;">
<li>Then click the '''I2C_TEST''' button to open the i2c test interface</li></ol>
[[File:media/image370zero2w-img370.png]]
<ol start="5" style="list-style-type: decimal;">
<li>The i2c test interface of wiringOP is shown in the figure below</li></ol>
[[File:media/image371zero2w-img371.png]]
<ol start="6" style="list-style-type: decimal;">
<li>Then click the device node selection box in the upper left corner to select the i2c you want to test</li></ol>
[[File:media/image372zero2w-img372.png]]
<ol start="7" style="list-style-type: decimal;">
<li>Then connect an i2c device to the 40pin i2c pin. Here we take the ds1307 rtc module as an example.</li></ol>
[[File:media/image178zero2w-img178.png]]
<ol start="8" style="list-style-type: decimal;">
<p>'''Or'''</p>
<p>apollo-p2:/ # '''i2cdetect -y 2'''</p>
<p>[[File:media/image373zero2w-img373.png]]</p></li>
<li><p>Then set the i2c address to 0x68 in wiringOP, and then click the '''OPEN''' button to open i2c</p>
<p>[[File:media/image374zero2w-img374.png]]</p></li>
<li><p>After clicking the '''OPEN''' button to open i2c, the display is as follows</p>
<p>[[File:media/image375zero2w-img375.png]]</p></li>
<li><p>Then we test writing a value to the register of the rtc module, for example, writing 0x55 to the 0x1c address</p>
<ol style="list-style-type: lower-alpha;">
<li><p>We first set the address of the register to be written to 0x1c</p>
<p>[[File:media/image376zero2w-img376.png]]</p></li>
<li><p>Then set the value to be written to 0x55</p>
<p>[[File:media/image377zero2w-img377.png]]</p></li>
<li><p>Then click the '''WRITE BYTE''' button to perform the writing action</p>
<p>[[File:media/image378zero2w-img378.png]]</p></li></ol>
</li>
<li><p>Then click the '''READ BYTE''' button to read the value of the 0x1c register. If it displays 0x55, it means that the i2c read and write test has passed.</p>
<p>[[File:media/image379zero2w-img379.png]]</p></li></ol>
<span id="pin-pwm-test"></span>
<li>First click the wiringOP icon to open wiringOP APP</li></ol>
[[File:media/image351zero2w-img351.png]]
<ol start="3" style="list-style-type: decimal;">
<li>Then click the '''PWM_TEST''' button on the main interface of wiringOP to enter the PWM test interface</li></ol>
[[File:media/image380zero2w-img380.png]]
<ol start="4" style="list-style-type: decimal;">
<div class="figure">
[[File:media/image381zero2w-img381.png]]
</div>
<li>Then set which PWM you want to use in the Channel. The default is PWM1. If you want to set it to PWM2, just enter 2 in the Channel. PWM3 and PWM4 and so on.</li></ol>
[[File:media/image382zero2w-img382.png]]
<ol start="6" style="list-style-type: decimal;">
<li>Then you can set the PWM period. The default configuration is '''50000ns'''. The converted PWM frequency is '''20KHz'''</li></ol>
[[File:media/image383zero2w-img383.png]]
<ol start="7" style="list-style-type: decimal;">
<li>Then click the '''EXPORT'''button to export PWM</li></ol>
[[File:media/image384zero2w-img384.png]]
<ol start="8" style="list-style-type: decimal;">
<li>Then drag the progress bar below to change the PWM duty cycle, and then check '''Enable''' to output the PWM waveform.</li></ol>
[[File:media/image385zero2w-img385.png]]
<ol start="9" style="list-style-type: decimal;">
<li>Then use an oscilloscope to measure the corresponding pins in the 40pin development board and you can see the following waveform.</li></ol>
[[File:media/image386zero2w-img386.png]]
<span id="how-to-compile-android-12-source-code"></span>
</li></ol>
[[File:media/image387zero2w-img387.png]]
<ol start="2" style="list-style-type: decimal;">
{| class="wikitable"
|-
| * *'''Date**'''
| '''Release Notes'''