• sales

    +86-0755-88291180

Raspberry Pi Gesture recognition module - Gesture control RGB lights User Guide

Gesture control RGB lights

1. Purpose

In this course, we mainly learn to use Arduino, gesture recognition module and RGB light module to realize gesture control RGB lights.

2. Preparation

Wiring diagram as shown below.



Note: As shown in the figure below, we use the Uno sensor expansion board. If you don’t have an expansion board, you can connect the Arduino board and modules by DuPont lines.


 

3. About code

Please check .ino file.

We need to initialize the gesture recognition module through the initialization function, and the gesture can be recognized after the initialization is successful.


In the main loop, different values are returned by continuously detecting different gestures, the obtained data is judged by switch statement. RGB lights of different colors are light up.


.....

4. Compiling and downloading code

4.1 We need to open the .ino file by Arduino IDE software. Then click“√”under the menu bar to compile the code, and wait for the word "Done compiling " in the lower left corner, as shown in the figure below.

 

4.2 In the menu bar of Arduino IDE, we need to select 【Tools】---【Port】--- selecting the port that the serial number displayed by the device manager just now, as shown in the figure below.


4.3 After the selection is completed, you need to click “→”under the menu bar to upload the code to the UNO board. When the word “Done uploading” appears in the lower left corner, the code has been successfully uploaded to the UNO board, as shown in the figure below.


5. Phenomenon

After the program is downloaded successfully,

After the program is downloaded successfully, if the gesture recognition module be initialized successfully, the serial port will print "INIT OK", otherwise it will print "INIT ERROR,CODE:".

If it not be initialized, we can press the reset button on Arduino board to restart the program and initialize module.

When the module is initialized successfully.

Put the gesture recognition module in the vertical direction, open your palm to face the module, Swing over your palm from left to right in front of the module, RGB light will become red.

Swing over your palm from left to right in front of the module, RGB light will become blue.

Swing over your palm from bottom to top in front of the module, RGB light will become yellow.

Swing over your palm from top to bottom in front of the module, RGB light will become purple.

Approach from front to back directly in front of the module, RGB light will become sky blue.

Wave your hand in front of the module for a while, RGB light will light off.

Arduino

Micro:bit

Jetson NANO

Raspberry Pi

TAG: X1011 Raspberry Pi 5 PCIe to M.2 NVMe 4-Ports SSD Board HAT Pi5 Four-Times 2280 ESP32 2 inch Capacitive TouchScreen LCD Display ST7789 CST816D 240x320 For Arduino/Raspberry Pi/Pico Pi5-Active-Cooler-C Serial Bus Servo LuckFox ESP32 S3 AI Voice Chat Robot Mini Development Board DeepSeek Raspberry Pi IR Thermal Imagi Industrial Grade Isolated USB TO RS232/485 (B) Serial UART Converter FT232RNL For Wall/Rail-Mount Industrial Isolated RS485 TO ETH (C) RJ45 Converter Wall/Rail-Mount For Modbus Servo PWM motor WP5320 WP5335 35/20KG.CM 180° PWM digital servo double ball bearings IMX462 Raspberry Pi 1.3inch ADXL355BEZ Raspberry Pi 10.1 inch LCD HDM Display Capacitive TouchScreen 10.1EP-CAPLCD 1920x1200 For Jetson Nano/mini Computer PC Raspberry Pi 10.1 inch DSI LCD TouchScreen Display 800x1280 Also For RK3576/RK3506/ESP32-P4 Raspberry Pi 5 Fan ESP32 C5 Development Board 1.47 inch LCD Display Screen ST7789 For WiFi6/LVGL/HMI Onborad SD-Port/RGB-LED ESP32 C3 Round LCD Development Board Electronic EYE 0.71 inch Display Watch Screen GC9D01 160x160 ESP32 S3 Development Board 1.85 inch Round LCD Display 360×360 QMI8658 Sensor / MIC / SD /MP3 Audio /Battery Port LVGL/HMI For Arduino Raspberry Pi MLX90640