Every time we watch Minority Report we want to make wild hand gestures at our computer — most of them polite. [Rootsaid] wanted to do the same and discovered that the PAJ7620 is an easy way to read hand gestures. The little sensor has a serial interface and can recognize quite a bit of hand waving. To be precise, the device can read nine different motions: up, down, left, right, forward, backward, clockwise, anticlockwise, and wave.
There are plenty of libraries to read it for common platforms. If you have an Arduino that can act as a keyboard for a PC, the code almost writes itself. [Rootsaid] uses a specific library for the PAJ7620 and another —
Nicohood — for sending media keys.
With those two libraries, it is very simple to write the code. You simply read a register from the sensor and determine which key to send using the
Nicohood library. The serial communications is I2C and there’s a tiny optical sensor onboard along with an IR LED.
Of course, you could send other keys than media controls. We wouldn’t mind going back and forward on web pages with a gesture, for example.