Example Code for Mind+-Graphical Programming
No coding is required. By dragging and dropping graphical building blocks, you can make the sensor output the number of faces, position coordinates, and the types of recognized gestures (such as "thumbs-up", "OK", etc.).
Hardware Preparation
- DFR0216 DFRduino UNO R3 ×1
- DFR0265 Gravity: IO Sensor Expansion Board V7.1 ×1
- SEN0626 AI Visual Gesture/Face Tracking Sensor ×1
Software Preparation
- Mind+ programming software Click to download Mind+
- Detailed installation tutorial: Mind+ Basic Wiki Tutorial - Software Download and Installation
Other Preparation Work
- Download and Install the Software: Click Download Mind+ and follow the prompts to complete the installation (refer to the Mind+ Basic Installation Tutorial).
- Select Device and Add Extension:
- Open Mind+, switch to "Upload Mode", and select "Arduino Uno" in "Extensions" → "Main Control Board";
- Click "User Library", paste the link: https://gitee.com/zhangtang6677/ext-gestureFaceDetectionSensor.git, search for and add the "Gesture and Face Tracking Sensor" extension.
- **Graphical Programming: **Drag modules from the left building block area (such as "Read Number of Faces", "Read Gesture Type", etc.) to form a simple program (refer to the example diagram).
Sample Code

Result
- Connect the sensor to the computer with a data cable, "Connect Device" in Mind+ and select the corresponding port;
- Click "Upload to Device", and after completion, open the "Serial Monitor" to see the real-time output of face, gesture, and face coordinate data (such as "Number of faces: 1", "Gesture: 2 (OK gesture)").
Other Supplementary Information
- In the Mind+ and MakeCode graphical programming environments, the sensor only supports the I2C communication mode and does not support the UART mode for the time being. Please switch the sensor's communication mode switch to the I2C side to ensure proper use.
- For supported gestures and corresponding information, refer to the "Detailed Explanation of Core Functions" section above in the Wiki.
- If no data is output, check whether the device connection is secure and whether the extension library is added correctly.
Was this article helpful?
