Many times while giving presentations to a huge audience, we need the help of a keyboard or mouse to navigate through different slides. But it is not easy to use and looks a bit odd as well.
So today we will make a gesture-based smart HID device that allows you to control your PC or laptop while giving a presentation or previewing slides. This device also helps you to play, pause and skip songs and videos using hand gestures. Another best part of this device is that it is contactless so you can control the PC even when your hands are messy.
So let’s start the project.
Bill Of Material
First of all, install the library for sensors so that we can retrieve the data from gestures. Here we are going to use the APDS 9960 gesture sensor. In the Arduino IDE, install the library using the following steps:
Sketch → Library manager → Search APDS9960 → Install
After installing the library, you can start coding.
First include the keyboard library so that the HID capability of Arduino Pro Micro can be used.
Also include the Arduino APDS9960 library in the code.
Next, create the setup function with which a two-wire communication for APDS9960 and keyboard for HID can be established.
Now create a loop function for checking the hand gestures. Using different switches/keys, set the actions for different gestures. For instance, here, I have used the left arrow to set the HID action for the left gesture. So, whenever we give a left gesture, the PPT slides or pictures are moved to the next. In this way, we can set the HID action for other gestures as well to perform various functions such as play, pause, next, skip and so on.
After uploading the code, connect the components as shown in the following diagram:
Open any PPT slides or pictures to preview. Plug the device into the computer and wait for a few seconds. After that, using hand gestures, you can move the PPT slides forwards or backwards as per your choice.
Now you can give a presentation without any difficulties.