• sales

    +86-0755-88291180

Raspberry Pi Gesture recognition module - Raspberry Pi Gesture recognition User Guide

Gesture recognition

1. Purpose

In this course, we mainly learn to use Raspberry Pi and gesture recognition module.

2.Preparation

2.1 About wiring

  

2.2 You need to open the IIC service of Raspberry Pi board.

We can input following command to check whether I2C is successfully started.

lmusb


2.2 Install I2Ctool

Input following command in command terminal,

sudo apt-get install i2c-tools

2.4 Scan all i2c devices on a certain bus, and print out the device i2c bus address.

i2cdetect -y -a 1

For gesture recognition module, IIC address is 0x73.


3Code

About code, please view PAJ7620U2.py file.

4Running code

Input following command in command terminal of Raspberry Pi.

python3 PAJ7620U2.py

3.1 Define the device address and register address of the module.


3.2 Define initialization array, register array, gesture register address.

 

....

3.3 Through I2C, the value of the initializing array and the initializing array of gesture register are written into the corresponding registers to start and initialize the gesture recognition module.


3.4 Gesture recognition function: judge the currently recognized gesture by reading the value of the gesture recognition storage register and print out the corresponding gesture name.


3.5 After successful initialization, the gesture recognition function is cycled to judge the current gesture.


4Running code

Input following command in command terminal of jetson nano.

python3 PAJ7620U2.py

After the program running, if the module is initialized successfully, Jetson NANO system will print "Gesture Sensor OK", otherwise it will print "Gesture Sensor Error". If the initialization fails, we need to run code again.

After the initialization is successful, the module will start judge the value of gesture recognition, and different gestures will print out different action names through the serial port.

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, Raspberry Pi system will print "Left".

Swing over your palm from left to right in front of the module, Raspberry Pi system will print "Right".

Swing over your palm from bottom to top in front of the module, Raspberry Pi system will print "Up".

Swing over your palm from top to buttom in front of the module, Raspberry Pi system will print "Down".

Approach from back to front directly in front of the module, Raspberry Pi system will print "Forward".

Approach from front to back directly in front of the module, Raspberry Pi system will print "Backward".

Make a fist and stretch out two or three fingers to point to the front of the module, then circle it clockwise for a while, Raspberry Pi system will print "Clockwise".

Make a fist and stretch out two or three fingers to point to the front of the module, then circle it counterclockwise for a while, Raspberry Pi system will print "AntiClockwise".

Wave your hand in front of the module for a while, Raspberry Pi system will print "Wave".

Arduino

Micro:bit

Jetson NANO

Raspberry Pi

TAG: DeepSeek XiaoZhi AI Chat Robot ESP32-S3 1.54 inch LCD N16R8 MUMA Development Board Display Screen Wifi Weather Station TimeClock ESP32-P4 Pico WIFI6 Development Board C6 MIPI DSI 10.1-inch Display /CSI Camera /Audio Speaker Mic AI Deepseek Raspberry Pi Pico 2 RP2350 ETH CH9120 TCP/UDP Ethernet Network For Arduino USB TO 2.5G Ethernet Port Converter RJ45 RTL8156B Driver-Free For Windows/macOS/Linux/Android Python HTTP Request Communication Raspberry Pi 5 Raspberry Pi 1.3inch IPS LCD display HAT X1202 Raspberry Pi 5 UPS Board Uninterruptible Power Supply For 18650-Li-Battery (NOT includ) 4-Ports UGV Rover PT AI OpenCV Robot Car MediaPipe For Raspberry Pi English Character Display Principle Raspberry Pi 3.7 inch e-Paper link (G) RYBW 416x240 For Arduino / Jetson Nano / STM32 Raspberry Pi LCD display screen 1.3inch ST7789 with Game Button A Electronic EYE 0.71 inch Round LCD Display Screen For Arduino Raspberry Pi ESP32 Pico STM32 i5-1135G7 Raspberry Pi 5 PCIe to 4-CH PCIe FFC HAT Board Pi5 4 Channels development board ESP32-S3 DeepsSeek XiaoZhi AI Voice Chat ESP32-S3 1.54 inch LCD Kit N16R8 WROOM-1-N16R8 DevKitC-1 Development Board RP2040 Pi5