[UNIHIKER K10][MindPlus][Blocks] General Function Examples

Last revision 2026/08/13

HUSKYLENS 2 with MindPlus blocks enables WiFi control, parallel or switchable AI models, on-screen drawing, programmable learn/forget IDs, and audio/photo capture via UNIHIKER K10.

Before using this function, please update HUSKYLENS 2 to the latest firmware. It works with the HUSKYLENS 2 library v0.2.4 and higher in MindPlus. Click here for the firmware update tutorial

1. Wireless Communication

Before you start, please refer to the System Settings Guide to learn how to install and configure the WiFi module.

When the WIFI module is installed on HUSKYLENS 2, when connected to the same WIFI as the Board, you can use the wireless communication block blocks to achieve wireless communication between the Board and HUSKYLENS 2.

Step1:install the WIFI module on HUSKYLENS 2. Click here for the installation tutorial.

Step 2: Connect HUSKYLENS 2 to the network. Open System Settings\WiFi, enable WiFi, click on the corresponding WiFi name, and enter the password.

Alternatively, click the QR code icon in the top right corner, scan the corresponding QR code, and connect to WiFi.

Once connected successfully, you will get the IP address of HUSKYLENS 2. This address is the IP to fill in the wireless communication block in block.

Interface Diagram

Step 3: Load the UNIHIKER K10 WiFi library.

In the Extension, load Module\Network\WiFilibrary.

Interface Diagram

enter the same WiFi name and password as HUSKYLENS 2 in block.

Example program:

Result: As shown below, make sure HUSKYLENS 2 is powered on and connected to WiFi. Use a USB cable to connect the UNIHIKER K10 to the computer and upload the program. No data cable is needed between the UNIHIKER K10 and HUSKYLENS 2.

When "Connection Successful" appears on the UNIHIKER K10 screen, HUSKYLENS 2 automatically enters hand recognition mode. Press the onboard A button on the UNIHIKER K10 to remotely draw a rectangle on the HUSKYLENS 2 screen.

2. Multi-Model Usage

2.1 Running Multiple Models in Parallel

HUSKYLENS 2 supports multiple models working simultaneously to perform different vision recognition tasks. Up to 3 models can be used at the same time.

If only 2 models are loaded, the third model must be set to "None"), and computing power can be manually allocated to each model.

As shown below: face recognition, hand recognition, and object tracking models can be used simultaneously to detect whether a person appears in the frame, what gesture the person is making, and whether the object we are tracking is present. Here, we allocate equal computing power to the three models.

Before uploading this program, complete the following steps separately:
In the face recognition function, enroll one face and name the face with ID1 as Li Lei.
Under hand recognition function, enroll one gesture and name the hand gesture with ID1 as peace sign.
In the object tracking function, track an apple and assign the name apple to its ID.
Objects enrolled and named in each mode will be inherited in the multi-model mode.

Example program:

Result: As shown below, when a learned person, hand gesture, or tracked object appears in the frame, HUSKYLENS 2 can recognize them in real time and display their corresponding names on the UNIHIKER K10 screen. Please pre-learn the face, gesture, and object to be tracked.

Interface Diagram

2.2 Switching Between Multiple Models

HUSKYLENS 2 has many built-in models. If you want to switch between different models in Project, we recommend using multi-model mode to pre-load the models you plan to use, and then switch between them by configuring the computing power allocation.

As shown below, to detect in real time whether a person has fallen in the frame and then determine who the fallen person is, you can first enable the fall detection model, and after a fall is detected, enable the face recognition model to recognize whether it is a learned face and identify the fallen person.

By using flag variables and switching computing power ratios, you can achieve smooth switching between multiple models, avoiding the time-consuming reloading of models each time you switch.

Example program:

Result: As shown below, when HUSKYLENS 2 detects a fall in fall detection mode, a warning message appears on the UNIHIKER K10 screen, and then it switches to face recognition mode to perform face recognition on the fallen person. If the face is a pre-learned face, the person's name appears on the UNIHIKER K10.

3.Screen Display

You can use the screen display blocks to draw text, rectangles, and indicator boxes on the HUSKYLENS 2 screen.

For rectangles, you can use the "Draw New Rectangle" block to draw multiple rectangles of different colors and sizes on the screen.

For the indicator box, you can only use the "Draw or Update Indicator Box" block to draw a specific indicator box on the screen. The "Draw or Update Indicator Box" block can also update the color and size of this specific indicator box.

Example program:

Result: As shown below, after running the program, HUSKYLENS 2 enters face recognition mode. The text "Welcome to Huskylens2" and two blue rectangles of different sizes appear on the screen.

Press the A button on the UNIHIKER K10, and a green indicator box appears on the screen.

Press the B button on the UNIHIKER K10, and the original green indicator box updates to a smaller red indicator box.

4.Learn/Forget ID

Normally, the way HUSKYLENS 2 learns and remembers IDs is by manually pressing button A on HUSKYLENS 2. HUSKYLENS 2 learns the target (face, object, pose, etc.) within the crosshair.

You can use the Learn/Forget ID block blocks to make HUSKYLENS 2 learn through the program, name targets with specific IDs, and forget all learned IDs.

Example program:

Result: As shown below, after running the program, HUSKYLENS 2 enters face recognition mode, and a blue rectangle appears in the top left corner.

When a face appears within the blue rectangle, press the onboard A button on the UNIHIKER K10, and HUSKYLENS 2 automatically learns the face and names ID1 face "Li Lei". Press the onboard B button on the UNIHIKER K10 to forget all face IDs.

5.Multimedia

You can use the multimedia block blocks to play audio, take photos, and capture screenshots on HUSKYLENS 2. The mp3 files for audio playback must be placed in the .\Huskylens\storage\audio directory.

Example program:

Result: As shown below, make sure music.mp3 exists in the .\Huskylens\storage\audio directory. Upload the program, and HUSKYLENS 2 enters face recognition mode. Press the B button, and HUSKYLENS 2 automatically takes a screenshot, and the UNIHIKER K10 screen displays the screenshot name. Press the A button, and HUSKYLENS 2 automatically plays the music.

Was this article helpful?

TOP