18
aMITy university rajasthan HAND GESTURE GAME SIMULATOR BATCH: 2013-2017 Practical Training 2

Hand Gesture Game Simulator Practical Presentation II

Embed Size (px)

Citation preview

aMITy university rajasthanHAND GESTURE GAME SIMULATORBATCH: 2013-2017

Practical

Training 2

Hand Gesture Game SimulatorA simple automation project with Raspberry Pi using ADXL345 accelerometer

to simulate better gaming experience. Supports All Windows Games, currently

functioning over Ethernet & WiFi.

Idea/Concept of this project

Expensive game simulators for Indian market.

Make open-source & cross-compatibility.

Simulate windows virtual keys.

DirectX programming.

Auto-Hot Keys for better gamming experience.

WiFi/Ethernet connection.

How it works?

Hardware Required

RaspberryPi single-board micro-controller

ADXL345 digital accelerometer

Power Bank

Jumpers, Glove

Software Required

Raspbian linux O.S

Python2.7 64-bit

SPECIFICATIONS: Raspberry Pi

COMPONENTS: RaspberryPi

RPi Gadgets

Name Specification

Pi Camera, Pi NoIR Camera•Fixed focus lens on-board•8 megapixel native resolution sensor-capable of 3280 x 2464 pixel static images•Supports 1080p30, 720p60 and 640x480p90 video•Size 25mm x 23mm x 9mm•Weight just over 3g•OpenCV using python & C++ libraries

Pi 7” LCD Touch ScreenMulti-touch capacitive touch

• 7 inch display

• 800 x 480 pixel resolution at 60 frames per second (fps)

• 24-bit RGB color

• 70° viewing angle

How to start working?

ADXL345 Accelerometer

The ADXL345 is a small, thin, low power,

3-axis MEMS accelerometer with high

resolution (13-bit) measurement at up

to +-16 g.

Digital output data is formatted as 16-

bit twos complement and is accessible

through either a SPI (3- or 4-wire) or I2C

digital interface.

Accelerometer Working

Accelerometer Calibration

Mathematics & Calculations

#calculation of tilt

roll = y/(math.sqrt(z*z + x*x))

rolldeg = math.atan(roll)*(180/(math.pi))

rolldeg = round(rolldeg,2)

pitch = x/(math.sqrt(z*z + y*y))

pitchdeg = math.atan(pitch)*(180/(math.pi))

pitchdeg = round(pitchdeg,2)

rollpitch = str(rolldeg) + " " + str(pitchdeg)

print rollpitch

Simulating Virtual Keys

LOGIC KEY CODE KEYBOARD

if input=='up': return 0x11 //KEY_w

elif input=='lt': return 0x1E //KEY_a

elif input=='rt': return 0x20 //KEY_d

elif input=='dn': return 0x1F //KEY_s

elif input=='sp': return 0x39 //KEY_space

elif input=='rc': return 0x9D //KEY_RCTRL

How to make Connection

Hardware Connection Using Ethernet & WiFi.

Software Connection Using Python Socket Connection.

SERVER.PY

IP=getAddrIP();

sock.bind((IP,1234))

result,addr=sock.recvfrom(16)

CLIENT.PY

import socket

server_address =('192.168.182.103',1234)

sock.connect(server_address)

Future Scope

Dedicated gesture control for blind humans to interact with

Computers.

Future Scope

Simulating mouse events to automate shooting & action games.

Future Scope

EEG Game Simulator Using RaspberryPi & BCI

Thank You!

Questions?

Project By:Vishal Aditya

B.Tech(CS&E)

7th SEM

A20405213038

Links:GitHub: https://github.com/vsl-tech/hggamesimulator

Youtube: https://youtu.be/4pJtTksczvs

Blog: https://www.vslcreations.blogspot.in

LinkedIn: https://www.linkedin.com/in/vslcreations

Email: [email protected]