Gesture recognition is a topic in computer science and language technology with the goal of interpreting human gestures via mathematical algorithms. Gestures can originate from any bodily motion or state but commonly originate from the face or hand.

Users can use simple gestures to control or interact with devices without physically touching them

I used PAJ7620U2 Gesture Sensor.

PAJ7620U2 Gesture Sensor, gesture recognition function with general I2C interface into a single chip. It can recognize 9 gestures including move up, move down, move left, move right, etc. with a simple swipe of your hand.

(this sensor works with 3.3V)

for this project you need use HID (Human Interface Device) supporting Arduino. I used Digispark board.

You have to be aware that a lot depends on the timing.

For example, if you move your hand towards the sensor, it will read as forward and send a zoom in command. While executing this command, you must quickly move your hand away from the sensor, otherwise it will read as a backward and sends the zoom out command.

you can customize this times with delays and GES_REACTION_TIME , GES_QUIT_TIME in the code.

You can download the code from the YouTube video description.