Project tutorial
Gesture Based Wireless Gaming Console

Gesture Based Wireless Gaming Console © GPL3+

Project aim is to develop wireless gaming controller using Arduino, Xbee s2, accelerometer , bump switches and also also created 2D game.

  • 2,021 views
  • 0 comments
  • 4 respects

Components and supplies

Necessary tools and machines

Digital camera

Apps and online services

Ide web
Arduino IDE
xctu
Game editor
picassa
Paint
Adobe Photoshop

About this project

Introduction

Now a days virtual environment is considered as a means of efficient human interaction. This is defined by the diversified field of application. The range of applications include phobia therapy, military simulation, medical training etc.., The progressive advancements in the field of electronics have led to a still more widening of the spectrum of human computer interaction. The user interface approach of using keyboard, mouse, pen are not catching up to the race. The use of hand gestures as a input method providing human computer interaction. This will be useful in controlling gaming applications using hand gestures.

Methodology

A game controller is a device used with games or entertainment systems to provide input to a video game, typically to control an object or character in the game. A controller is usually connected to a game console or computer by means of a wire or cord, although, since the mid-2000s, wireless controllers have become widespread. Input devices that have been classified as game controllers include keyboards, mice, gamepads, joysticks, etc. Special purpose devices, such as steering wheels for driving games and light guns for shooting games, are also game controllers. Game controllers have been designed and improved over the years to be as user friendly as possible. The Microsoft Xbox controller, with its shoulder triggers that mimic actual triggers such as those found on guns, has become popular for shooting games. Some controllers are designed to be deliberately best for one type of game, such as steering wheels for driving games, or dance pads for dancing games. One of the first video game controllers was a simple dial and single button, used to control the game Tennis for Two. Since then, controllers have evolved to include directional pads, multiple buttons, joysticks, motion sticks, touch screens, and a plethora of other features detection, analog In our project we are going to implement accelerometer based game controller using xbee for wireless capability.

  • A game controller is a device used with games or entertainment systems to provide input to a video game, typically to control an object or character in the game. A controller is usually connected to a game console or computer by means of a wire or cord, although, since the mid-2000s, wireless controllers have become widespread. Input devices that have been classified as game controllers include keyboards, mice, gamepads, joysticks, etc. Special purpose devices, such as steering wheels for driving games and light guns for shooting games, are also game controllers. Game controllers have been designed and improved over the years to be as user friendly as possible. The Microsoft Xbox controller, with its shoulder triggers that mimic actual triggers such as those found on guns, has become popular for shooting games. Some controllers are designed to be deliberately best for one type of game, such as steering wheels for driving games, or dance pads for dancing games. One of the first video game controllers was a simple dial and single button, used to control the game Tennis for Two. Since then, controllers have evolved to include directional pads, multiple buttons, joysticks, motion sticks, touch screens, and a plethora of other features detection, analog In our project we are going to implement accelerometer based game controller using xbee for wireless capability.

I have included all the information in attachment (Cad/enclosuxbees it has all the information from

  • pairing xbees
  • game editor information
  • a hardware
  • sensors

Etc

Thank you ! :)

Code

Tx codeArduino
This code is for Arduino which is at Transmitter section
const int buttonPin = 6;   int buttonState = 0; 
const int buttonPin1 = 3;   int buttonState1 = 0; 
const int buttonPin2 = 4;   int buttonState2 = 0; 
const int buttonPin3 = 5;   int buttonState3 = 0; 
const int groundpin = 18;             // analog input pin 4 -- ground
const int powerpin = 19;              // analog input pin 5 -- voltage
const int xpin = A3;                  // x-axis of the accelerometer
const int ypin = A2;                  // y-axis
const int zpin = A1;                  // z-axis (only on 3-axis models ADXL335)
void setup()
{
  pinMode(13,OUTPUT);  pinMode(buttonPin, INPUT);  
  Serial.begin(9600); pinMode(groundpin, OUTPUT);
  pinMode(powerpin, OUTPUT);
  digitalWrite(groundpin, LOW); 
  digitalWrite(powerpin, HIGH);

}
void loop()
{
   buttonState = digitalRead(buttonPin);
   buttonState1 = digitalRead(buttonPin1);
   buttonState2 = digitalRead(buttonPin2);
      buttonState3 = digitalRead(buttonPin3);
       if( analogRead(ypin)>400){  // can use any direction
     Serial.println('5');
    delay(500);
  }
    if( analogRead(ypin)<300){  
     Serial.println('6');
    delay(500);
}
  if (buttonState == HIGH) {     
    Serial.println('1');
    delay(500);
  }

if (buttonState1 == HIGH) {     
    Serial.println('2');
    delay(500);
  }
  if (buttonState2 == HIGH) {     
    Serial.println('3');
    delay(500);
  }
  if (buttonState3 == HIGH) {     
    Serial.println('4');
    delay(500);
 
  }
  
}
RX sectionArduino
This code is for receiver arduino Leonardo
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup() { 

  Serial.begin(9600);

while (! Serial) {
  Keyboard.begin();mySerial. begin(9600);
}
}

void loop() {
  // use serial input to control the mouse:
  if (mySerial. available ()){

   int inChar = mySerial. read ();

    switch ( inChar) {   
    case '1':

     Keyboard.press('m'); delay(100);
     Keyboard.release('m');

      break; 
    case '2':

     Keyboard.press(KEY_LEFT_ARROW);Keyboard.press('s');delay(300);  Keyboard.release(KEY_LEFT_ARROW);Keyboard.release('S');
      break;
    case '3':
   
     Keyboard.press(KEY_RIGHT_ARROW);Keyboard.press('s');delay(300);  Keyboard.release(KEY_RIGHT_ARROW);Keyboard.release('S');
      break;
    case '4':
  
     Keyboard.press('s'); delay(500); Keyboard.release('S');
      break;
  case '5':
  
     Keyboard.press(KEY_RIGHT_ARROW); delay(500); Keyboard.release(KEY_RIGHT_ARROW);
      break;
       case '6':
  
     Keyboard.press(KEY_LEFT_ARROW); delay(500);Keyboard.release(KEY_LEFT_ARROW);
      break;
    }
  }
}

Custom parts and enclosures

REPORT
Complete Report PDF
Game editor
Game file which I have designed in game editor software.
axr22.exe

Schematics

TX schematic
Tx
Rx section
Rx schematic
Rx2

Comments

Similar projects you might like

Gesture Recognition Using Accelerometer and ESP

Project tutorial by mellis

  • 37,800 views
  • 17 comments
  • 70 respects

Programmable Wireless Room Thermostat (Bluetooth Accessible)

Project tutorial by Tamer Savaşcı

  • 3,098 views
  • 0 comments
  • 8 respects

Gesture Drive: Accelerate with Freedom

Project tutorial by Shahariar

  • 2,833 views
  • 0 comments
  • 12 respects

GameBox - The Arduino LCD Console

Project tutorial by Team Mattia Colasanto

  • 2,431 views
  • 0 comments
  • 6 respects

Han Solo DL-44 Blaster Remote

Project tutorial by Alex Merchen

  • 1,297 views
  • 0 comments
  • 7 respects

RF BASED SMART HOME AUTOMATION SYSTEM

by Dennis Mwanza

  • 28,759 views
  • 4 comments
  • 45 respects
Add projectSign up / Login