02 Graphics Tablet Application Case
1 Case Source Code and HAP Package Acquisition
1.1 Obtaining the Case Source Code
- Download WriteBoard_API12.zip from Baidu Netdisk.
Link:
Extraction code:

Note:
Project Path:
ShimetaPi OpenHarmony Resources>SC-3568HA>05-Development Resources>01-OpenHarmony Development Resources>APP Demo>WriteBoard_API12.zip
- Extract the zip file and open the project in DevEco Studio to view the source code.
1.2 Obtaining the Case HAP Package
- Download WriteBoard_API12.hap from Baidu Netdisk.
Link:
Extraction code:
Note:
File Path:
ShimetaPi OpenHarmony Resources>SC-3568HA>05-Development Resources>01-OpenHarmony Development Resources>APP Demo>Hap_Package>WriteBoard_API12.hap
2 Case Installation Tutorial
This section introduces how to use the application case by pushing the HAP package to M4-R1.
- Connect the computer's USB port to the M4-R1 OTG port, and open the command prompt (cmd) on the computer.
- Execute the following command to check if the HDC connection is successful. If successful, it will display the device as shown in the following figure.
hdc list targets- Execute the following command to navigate to the directory where the HAP package is stored. In this case, the HAP package is stored on the desktop.
cd C:\Users\Administrator\DesktopSuccessful directory switching is shown in the following figure.
- Execute the following command to install the HAP package.
hdc install ${hap_name} #hap_name: The name of the HAP package
hdc install SerialTool_API12.hapUpon success, the following information will be returned.

The application icon will now appear on the development board desktop.

3 Case Function Introduction
- Click the desktop icon to enter the application interface.
In the left box, the top row is the color selection button. Click to select the corresponding brush color;
On the right side of the middle, there is a slider. Drag it to adjust the brush thickness - the farther right, the thicker;
At the bottom of the box, there are two buttons: "Undo" and "Clear". Click "Undo" to delete the last stroke, and click "Clear" to erase all drawings and return to a blank canvas.

- The following is a demonstration of some functions.

