Home / Tutorials / Arduino Tutorial / Using the Grove Gesture Sensor
Grove gesture sensor

Using the Grove Gesture Sensor

Wouldn’t it be cool if you could control something by just waving your hands? Well, this is what the grove gesture sensor does. In this post, I will show you how to use this sensor with an Arduino and create a simple gesture control project.

Getting Started

Using modules with arduino is easy but grove sensors make it a lot easier. With the grove shield, you can just plug the grove gesture sensor directly; no need for breadboards and jumper wires!

Grove - Gesture(PAJ7620U2)

The grove gesture sensor communicates via I2C. Thus, it must be connected to one of the I2C sockets on the grove shield.

Next, download the Arduino library for the sensor. You can download it on this link and place the files to Documents/Arduino/Libraries on you computer.

It is also possible to download the library via the library manager. On your Arduino IDE, go to Tools > Manage Libraries. On the search field of the Library Manager, type “PAJ7620U2”. The library should now appear.

Click the “Install” button. This should now install the library on your computer.

After attaching the sensor to the shield and downloading the library, the gesture sensor is ready to use!

Using the Example Sketch

Next is to try out one of the examples included in the library. Open the example sketch at File->Example->Gesture_PAJ7620->paj7620_9gestures. Make sure your Arduino is now connected to your computer then open the serial monitor.

As the sketch’s name suggests, the grove gesture sensor can detect 9 different gestures. Those gestures are up, down, left, right, clockwise, counter clockwise, forward, backward, and wave. Try these movements about 5 to 10 cm in front of the sensor and you should see the output on the serial monitor.

Control a Servo Motor using Gestures

Now we will create a simple project that controls a servo motor using hand gestures. The servo motor arm can move either left or right only so we will be only using two gestures.

For this project, we follow this wiring diagram:

Grove gesture sensor servo motor project

Here is the full sketch:

What project can you think of using the grove gesture sensor? Drop your answer on the comments below!

Check Also

Sensor attached to Arduino UNO

Using a Fingerprint Sensor

Fingerprint sensors are old technology but it wasn’t readily available to makers until it was …

Leave a Reply

Your email address will not be published. Required fields are marked *