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

Hand Gesture Game Simulator Practical Presentation II

Jan 23, 2018

Download

Engineering

Vishal Aditya
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hand Gesture Game Simulator Practical Presentation II

aMITy university rajasthanHAND GESTURE GAME SIMULATORBATCH: 2013-2017

Practical

Training 2

Page 2: Hand Gesture Game Simulator Practical Presentation II

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.

Page 3: Hand Gesture Game Simulator Practical Presentation II

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.

Page 4: Hand Gesture Game Simulator Practical Presentation II

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

Page 5: Hand Gesture Game Simulator Practical Presentation II

SPECIFICATIONS: Raspberry Pi

Page 6: Hand Gesture Game Simulator Practical Presentation II

COMPONENTS: RaspberryPi

Page 7: Hand Gesture Game Simulator Practical Presentation II

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

Page 8: Hand Gesture Game Simulator Practical Presentation II

How to start working?

Page 9: Hand Gesture Game Simulator Practical Presentation II

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.

Page 10: Hand Gesture Game Simulator Practical Presentation II

Accelerometer Working

Page 11: Hand Gesture Game Simulator Practical Presentation II

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

Page 12: Hand Gesture Game Simulator Practical Presentation II

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

Page 13: Hand Gesture Game Simulator Practical Presentation II

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)

Page 14: Hand Gesture Game Simulator Practical Presentation II
Page 15: Hand Gesture Game Simulator Practical Presentation II

Future Scope

Dedicated gesture control for blind humans to interact with

Computers.

Page 16: Hand Gesture Game Simulator Practical Presentation II

Future Scope

Simulating mouse events to automate shooting & action games.

Page 17: Hand Gesture Game Simulator Practical Presentation II

Future Scope

EEG Game Simulator Using RaspberryPi & BCI

Page 18: Hand Gesture Game Simulator Practical Presentation II

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]