Bluetooth Game Controller With Accelerometer and Arduino

by GeorjaiwinM in Circuits > Arduino

4473 Views, 8 Favorites, 0 Comments

Bluetooth Game Controller With Accelerometer and Arduino

3[1].jpg
LIVE.jpg
game controller
thumbnail.JPG

Everyone loves playing games on PC :) Gaming consoles take them to the next level and what's more fun than making one yourself? Here we have built a gaming console with Accelerometer, Arduino and Bluetooth. The Accelerometer in the game console translates your movements into in-game actions, like turning a steering wheel or whatever you want. You can play any game on your PC with this, you just need to change the required key as shown in the read me file. We are tracking the y axis of the Accelerometer, a threshold has been set, and the tilt along the y axis is translated into right or left keys. You can use all the axis to make really awesome game controllers! We did this as part of our Kickstarter called Jetpack a wireless programing Bluetooth shield+motor driver shield for Arduino. You can use your own substitutes for this.

Got 750% funded on Kickstarter! We are amazed by this response and so jet pack is now available for pre-order on http://www.jetpackshield.com/

Things required

  • Jetpack (Bluetooth shield)
  • Arduino
  • ADXL345(Accelerometer)
  • Conduit PVC Pipe
  • Push buttons
  • Python

Build Your Console With Pvc Conduit Pipe and Cardboard

001.jpg
005.jpg
006.jpg
  • You need two PVC conduit pipe. You can use any hollow material just keep in mind it must be light weight.
  • Put push buttons on top and route your wires through the pipe. Make a hole where the two pipes join(or center), refer the pictures for this.
  • Now use a small box to house your Arduino, Jetpack(bluetooth module) and accelerometer. Make a hole on top of the box. The wires from the switches will enter from here.

That's your console, Make it look cool!

Complete the Connections

570cd9d450e1b65da70005d3.jpeg
joystic_hndle.jpg
  • Complete the circuit as shown above.
  • Now if you have Jetpack you can program it over Bluetooth later. No worries, you won't have to unplug everything if you need to reprogram. You can do it OTW :) Or directly program it with Arduino. Just make sure everything is working before you close it up.The code is given below

*Refer this instructable (data monitoring) for wireless programing via jetpack. You will be using the outgoing Com Port when you upload the code

Install Python,Run the Python Script

Main_001.jpg
Main_002.jpg
  • Install python version 2.7(recommended) or above, Don't forget to check add to path while installation
  • Install pyserial library by entering "python -m pip install pyserial" in cmd.exe (for windows)
  • The default keys for console are the keyboard arrow keys
  • If you need to change the input keys refer the read me file(depends on the game you want to play)
  • Run the launch-joystick-mode.bat file Find the outgoing Com Port as shown in the picture above and enter when prompted

That's it! Its done :) Now start playing!

Downloads