Air-Controller with Wio Terminal, DFRobot GestureFace Sensor

Cette page contient des modifications qui ne sont pas marquées pour la traduction.

Auteur avatarCETECH | Dernière modification 16/09/2025 par CETECH

Introduction

Touchless interaction is transforming how we engage with devices—from smart homes and kiosks to contact-free workplace controls. In this tutorial, we'll build a gesture-controlled dashboard using the Wio Terminal and the DFRobot Gesture & Face Detection Sensor (SEN0626). This system can detect up to 10 faces, recognize five intuitive hand gestures, and display detection data on a vibrant GUI. It's fully offline, making it a perfect fit for privacy-sensitive applications.

Matériaux

Outils

Étape 1 - 🛠️ What You’ll Build

A slick GUI interface that:

  • Detects and displays real-time face location and confidence score
  • ✋ Tracks gesture type and score
  • 🖥️ Renders a visual dashboard on the Wio Terminal’s screen
  • 🔒 Operates fully offline—no cloud needed




Étape 2 - Get PCBs for Your Projects Manufactured

You must check out PCBWAY for ordering PCBs online for cheap!

You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. PCBWay now could provide a complete product solution, from design to enclosure production. Check out their online Gerber viewer function. With reward points, you can get free stuff from their gift shop. Also, check out this useful blog on PCBWay Plugin for KiCad from here. Using this plugin, you can directly order PCBs in just one click after completing your design in KiCad.




Étape 3 - 📘 About Wio Terminal

The Wio Terminal is a full-featured embedded development board designed for rapid prototyping and IoT.

🔧 Key Specs:

  • ATSAMD51 Cortex-M4F MCU (120–200MHz)
  • Realtek RTL8720DN Wi-Fi + BLE
  • 2.4" TFT LCD (320×240)
  • Grove connectors for sensor integration
  • Built-in microphone, accelerometer, buzzer, light sensor, infrared emitter
  • USB OTG, microSD slot
  • Full support for Arduino, CircuitPython, ArduPy




Étape 4 - 🎯 Spotlight: Gravity Offline Edge AI Gesture & Face Detection Sensor

The Gravity: Offline Edge AI Gesture & Face Detection Sensor (SEN0626) by DFRobot is a compact vision module designed for real-time gesture recognition and multi-person detection—without relying on cloud connectivity

Étape 5 - 🌟 Key Features

  • 🎮 Gesture Recognition: Detects 5 predefined gestures including thumbs-up, OK sign, open palm, peace sign, and hang loose (SIX) within a 0.5–3m range
  • Face & Presence Detection: Recognizes up to 10 faces or upper-body presences simultaneously with position and confidence score
  • 🔒 Fully Offline Processing: All AI inference runs onboard, preserving privacy and reducing latency
  • 🎛️ Interface Options: Communicates via I2C (default 0x72) or UART (RS485, Modbus protocol)
  • 🔌 Voltage Support: Operates between 3.3V and 5V, making it compatible with Arduino, Raspberry Pi, ESP32, and graphical platforms like MakeCode




Étape 6 - 💡 Why It Stands Out

Unlike traditional vision sensors or cloud AI APIs, the SEN0626 handles all computations locally with zero data transmission. This makes it perfect for environments like public kiosks, hospital automation, classroom counters, or smart bathrooms where privacy and simplicity are critical.

You can install it in ceilings, desks, or embedded enclosures, and it consistently outputs gesture ID, score, and face coordinates for real-time UI feedback.

Étape 7 - 🔗 Source

Explore technical docs, examples, and buy the sensor on the DFRobot product page

Étape 8 - Hardware Setup

Connect the Gesture & Face Sensor to Wio Terminal via I2C using a Grove cable:

  • SDA → SDA
  • SCL → SCL
  • VCC → 3.3V
  • GND → GND

Sensor Overview

The DFRobot Gesture & Face Detection Sensor features:

  • Recognition of 5 gestures:
  • 👍 LIKE (Blue)
  • 👌 OK (Green)
  • ✋ STOP (Red)
  • ✌️ YES (Yellow)
  • SIX (Purple)
  • Up to 10 faces simultaneously
  • Field of View: 85°
  • Range: 0.5m – 3m
  • Privacy: Full offline inference



Étape 9 - 💻 Code Overview

🖥️ Key Libraries

#include "DFRobot_GestureFaceDetection.h"
#include <TFT_eSPI.h>


💾 Setup Block
DFRobot_GestureFaceDetection_I2C gfd(0x72); // I2C Address
TFT_eSPI tft;

void setup() {
  Serial.begin(115200);
  Wire.begin();
  tft.begin();
  tft.setRotation(3);
  tft.fillScreen(TFT_BLACK);
  gfd.begin();
}
🔄 Loop Block
void loop() {
  if (gfd.getFaceNumber() > 0) {
    int faceX = gfd.getFaceLocationX();
    int faceY = gfd.getFaceLocationY();
    int score = gfd.getFaceScore();

    int gesture = gfd.getGestureType();
    int gScore = gfd.getGestureScore();
    
    // Display values using drawString() and drawRect()
  } else {
    // No face detected: show idle state
  }
  delay(500);
}


📌 You can customize the layout and colors using drawRect, drawString, and setTextColor() from TFT_eSPI.



Étape 10 - 📦 Libraries & Downloads

DFRobot Gesture/Face Sensor Arduino Library

  • DFRobot Gesture/Face Sensor Arduino Library
  • Wio Terminal Wiki + Setup Guide
  • Gesture Sensor Product Page

Final Thoughts

This project combines edge AI sensing with embedded GUI design to produce a real-time, privacy-safe control interface. Whether you're building a smart kiosk or experimenting with ambient UX, Wio Terminal and the SEN0626 sensor offer a perfect starting point.



Commentaires

Published