Download Print this page

Advertisement

Quick Links

9/25/2015
Grove - Gesture v1.0
From Wiki 来自痴汉的爱
Contents
1 Introduction
2 Features
3 Specification
http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0
Grove ­ Gesture v1.0 ­ Wiki
 
1/10

Advertisement

loading
Need help?

Need help?

Do you have a question about the PAJ7620U2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for SeeedStudio PAJ7620U2

  • Page 1 9/25/2015 Grove ­ Gesture v1.0 ­ Wiki Grove - Gesture v1.0 From Wiki 来自痴汉的爱   Contents 1 Introduction 2 Features 3 Specification http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0 1/10...
  • Page 2 9/25/2015 Grove ­ Gesture v1.0 ­ Wiki 4 With Arduino/Seeeduino 4.1 Suggest Reading for Starter 4.2 Hardware Installation 4.3 Gesture Library 4.3.1 Setup 4.3.2 Simple Demo 4.3.3 Description of functions 4.3.3.1 1. Initialize the gesture sensor chip PAJ7620 4.3.3.2 2. Read data from PAJ7620 register via I2C 4.4 Gesture Examples/Applications 5 Resources Introduction The sensor on Grove - Gesture is PAJ7620U2 that integrates gesture recognition function with general I2C interface into a single chip. It can recognize 9 basic gestures ,and these gestures information can be simply accessed via the I2C bus. Application: You can use Gesture as an input device to control another grove, or a computer, mobile phone, smart car, robot, and more with a simple swipe of your hand. Features 1 See 9 gestures in the following figure Down Left Right 9 basic Forward gestures Backward Clockwise Count Clockwise Wave http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0 2/10...
  • Page 3: Specification

    9/25/2015 Grove ­ Gesture v1.0 ­ Wiki 2 Built-in proximity detection 3 Various main boards support : Arduino UNO/Seeeduino/Arduino Mega2560 Specification Sensor  PAJ7620U2 Power supply  5V  Ambient light immunity  < 100k Lux  Gesture speed in Normal Mode  60°/s to 600°/s  Gesture speed in Gaming Mode  60°/s to 1200°/s  Interface type  IIC interface up to 400 kbit/s  Operating Temperature  -40°C to +85°C  Dimensions 20 * 20mm  Detection range 5-15mm With Arduino/Seeeduino Suggest Reading for Starter Download Arduino and install Arduino driver (http://www.seeedstudio.com/wiki/Download_Arduino_and_install_Arduino_driver)  Getting Started with Seeeduino/Arduino (http://www.seeedstudio.com/wiki/Getting_Started_with_Seeeduino)  Hardware Installation Grove products have a eco system and all have a same connector which can plug onto the Base Shield (http://www.seeedstudio.com/wiki/index.php?title=Base_shield_v2&uselang=en) . Connect this module to the I2C port of Base Shield, however, you can also connect Grove - Gesture to Arduino without Base Shield by jumper wires. Arduino UNO Base Shield Grove - Gesture I2C port Digit 2 Not connected INT (Reserved pad)
  • Page 4 9/25/2015 Grove ­ Gesture v1.0 ­ Wiki Plug Grove - Gesture onto the I2C port of Base shield Then plug Base shield onto the Arduino UNO http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0 4/10...
  • Page 5 9/25/2015 Grove ­ Gesture v1.0 ­ Wiki Gesture Library We have created a library to help you start playing quickly with the Seeeduino/Arduino, in this section we'll show you how to set up the library and introduce some of the functions. Setup 1.  Download the library code as a zip file from the Gesture_PAJ7620 github page. (https://github.com/Seeed-Studio/Gesture_PAJ7620) 2.  Unzip the downloaded file into your …/arduino/libraries. 3.  Rename the unzipped folder "Gesture"(or:"Gesture_PAJ7620") 4.  Start the Arduino IDE (or restart if it is open). Simple Demo The following simple demo will show you a very easy application: When you move up, the red led will be turned on, otherwise the red led will be turned off. #include <Wire.h> #include "paj7620.h" http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0 5/10...
  • Page 6: Description Of Functions

      paj7620ReadReg(0x43, 1, &data);  // When different gestures be detected, the variable 'data' will be set to different v     if (data == GES_UP_FLAG)               // When up gesture be detected,the vari     digitalWrite(4, HIGH);                   // turn the LED on (HIGH is the voltage level)   if (data == GES_DOWN_FLAG)             // When down gesture be detected,the variable '         digitalWrite(4, LOW);                  // turn the LED off by making the voltage LOW Description of functions These are the most important/useful function in the library, we invite you to look at the .h and .cpp files yourself to see all the functions available. 1. Initialize the gesture sensor chip PAJ7620 http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0 6/10...
  • Page 7         digitalWrite(4, LOW);                  // turn the LED off by making the voltage LOW We define some register data of gesture, refer to the following table. Register Gesture Register Data If Yes If Not Address data==GES_UP_FLAG Down data==GES_DOWN_FLAG Left data==GES_LEFT_FLAG Right data==GES_RIGHT_FLAG 0x43 Forward data==GES_FORWARD_FLAG Gesture No gesture detected detected Backward data==GES_BACKWARD_FLAG Clockwise data==GES_CLOCKWISE_FLAG Count data==GES_COUNT_CLOCKWISE_FLAG Clockwise Wave data==GES_WAVE_FLAG 0x44 http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0 7/10...
  • Page 8     error = paj7620ReadReg(0x43, 1, &data);       // Read Bank_0_Reg_0x43/0x44 for gesture result.   if (!error)        switch (data)                   // When different gesture           case GES_RIGHT_FLAG:         delay(GES_ENTRY_TIME);         paj7620ReadReg(0x43, 1, &data); http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0 8/10...
  • Page 9       Serial.println("Forward");         delay(GES_QUIT_TIME);         break;       case GES_BACKWARD_FLAG:              Serial.println("Backward");         delay(GES_QUIT_TIME);         break;       case GES_CLOCKWISE_FLAG: http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0 9/10...
  • Page 10                 Serial.println("wave");                 break;         delay(100); In your own project, you may need multi-gestures instead of a single gesture to realise one function , welcome to share!  Resources Grove - Gesture_v1.0 sch pcb.zip (http://www.seeedstudio.com/wiki/File:Grove_- _Gesture_v1.0_sch_pcb.zip)  PAJ7620U2_Datasheet_V0.8_20140611.pdf (http://www.seeedstudio.com/wiki/File:PAJ7620U2_Datasheet_V0.8_20140611.pdf) Library Grove - Guesture (https://github.com/Seeed-Studio/Gesture_PAJ7620) Retrieved from "http://www.seeedstudio.com/wiki/index.php?title=Grove_- _Gesture_v1.0&oldid=106495" Categories:  Sensor Grove This page was last modified on 23 July 2015, at 06:59. This page has been accessed 5,527 times. http://www.seeedstudio.com/wiki/Grove_­_Gesture_v1.0 10/10...

This manual is also suitable for:

Rb-see-465