Table of Contents

Play Video

SLOT SPAN BRIDGE

Software Used

Hardware Used

Platform Used

1.1. Purpose
-Control computer functions using hand gestures instead of traditional input devices.
1.2. Project Overview
-Arduino-based hand gesture control system for web browsing, task switching, video playback, and volume adjustments.

  1. Key Components
    2.1. Ultrasonic Sensors
    -Function: Detect hand distance and position.
    -Placement: Positioned at either end on top of a laptop screen.
    2.2. Arduino and Python Integration
    -Arduino: Calculates distance between hand and sensor.
    -Python Program: Collects distance data from Arduino.
    -PyAutoGUI Library: Converts distance data into keyboard click actions.
  2. System Operation
    3.1. Working Principle
    -Hand gestures in front of Ultrasonic Sensors are calibrated to perform different computer tasks.
    -The position and movement of the hand are detected and interpreted to execute specific actions.
    3.2. Gestures and Actions
    -Gesture 1:
    Hand in front of Right Ultrasonic Sensor (15CM to 35CM) and move away. Action: Scroll Down Web Page or Decrease Volume.
    -Gesture 2:
    Hand in front of Right Ultrasonic Sensor (15CM to 35CM) and move towards. Action: Scroll Up Web Page or Increase Volume.
    -Gesture 3:
    Swipe hand in front of Right Ultrasonic Sensor. Action: Move to Next Tab.
    -Gesture 4:
    Swipe hand in front of Left Ultrasonic Sensor. Action: Move to Previous Tab or Play/Pause Video.
    -Gesture 5:
    Swipe hand across both sensors (Left Sensor first). Action: Switch between Tasks (Chrome and VLC Player).
# gesture control python program for controlling certain functions in windows pc


import serial                                      # add Serial library for serial communication
import pyautogui                                   # add pyautogui library for programmatically controlling the mouse and keyboard.

Arduino_Serial = serial.Serial('com7',9600)       # Initialize serial and Create Serial port object called Arduino_Serial
 
while 1:
    incoming_data = str (Arduino_Serial.readline()) # read the serial data and print it as line
    print (incoming_data)                            # print the incoming Serial data
     

    if 'next' in incoming_data:                    # if incoming data is 'next'
        pyautogui.hotkey('ctrl', 'pgdn')           # perform "ctrl+pgdn" operation which moves to the next tab
        
    if 'previous' in incoming_data:                # if incoming data is 'previous'
        pyautogui.hotkey('ctrl', 'pgup')           # perform "ctrl+pgup" operation which moves to the previous tab

    if 'down' in incoming_data:                    # if incoming data is 'down'
        #pyautogui.press('down')                   # performs "down arrow" operation which scrolls down the page
        pyautogui.scroll(-100) 
         
    if 'up' in incoming_data:                      # if incoming data is 'up'
        #pyautogui.press('up')                      # performs "up arrow" operation which scrolls up the page
        pyautogui.scroll(100)
        
    if 'change' in incoming_data:                  # if incoming data is 'change'
        pyautogui.keyDown('alt')                   # performs "alt+tab" operation which switches the tab
        pyautogui.press('tab')
        pyautogui.keyUp('alt')
        
    incoming_data = "";                            # clears the data

SOFTWATRE USED –

OPEN CV

Scroll to Top