Lesson 7 Sorting Manipulator
ShadowNie 2021-02-05 08:47:45

7-1. Project Introduction

This project mainly uses the color recognition function of HUSKYLENS to place objects of different colors recognized into the corresponding areas. For example, if the color of the recognized object is red, the object will be placed into the left area; if it is blue, place it into the right area.

Note: this project should use 1000mAh lithium battery.

7-2. Hardware Preparation 


7-3. Installation Steps


7-4. Color Learning of HUSKYLENS

HUSKYLENS sensor employs the built-in algorithm to identify the ID of different colors and feed them back to the main controller board by learning and recording different colors.

The HUSKYLENS sensor is set by default to learn, recognize and track only one color, but we can set it to recognize multiple colors.

1. Choose “Color Recognition” function

Dial the function button to the left until the word "Color recognition" is displayed at the top of the screen.


Long press the “function button”to enter the parameter setting of the color recognition function. Dial the function button until "Learn Multiple" is displayed, then short press the function button, and dial to the right to turn on the "Learn Multiple" switch, that is, progress bar turns blue and the square icon on the progress bar moves to the right. Then short press the function button to confirm this parameter.


Dial the function button to the left until "Save & Return" shows. And the screen prompts "Do you want to save the parameters?" Select "Yes" in default, now short-press the function button to save the parameters and return automatically.

2. Color Learning


Point the “+” symbol at the color, long press the "learning button" to learn the first color. Then release the "learning button", a message "Click again to continue! Click other buttons to finish" will be displayed. Please short press the "learning button" before the countdown ends if you want to learn another color. If not, short press the "function button" before the countdown ends, or do not press any button to let the countdown ends.


 3. Color Recognition

When encountering the same or similar color blocks, a frame with an ID will be automatically displayed on the screen, and the size of the frame is the same as the size of the color blocks.


Note: Color recognition is greatly affected by ambient light. Sometimes HUSKYLENS may misidentify similar colors. Please try to use the sensor in environments with unchanged and suitable ambient light

7-5. Program Link


7-6. Program Screenshot


7-7. Effect Display

If the color detected is red, the Maqueen car turns left and places the object in the red area on the left; if it is blue, turns right and places the object in the blue area on the right.


Note: The object needs to be placed within the gripping range.

All Rights
COMMENTS ([[commentTotla]])
[[c.user_name]] [[c.create_time]]