July 28, 2014

Arduino Gyroscope Game Controller

I have returned!

Not long ago, I felt the need to quit programming Java (at least for a while) and return to electronics. Here is the final product.

I made a game controller utilising the Arduino Leonardo's keyboard emulation abilities and based heavily on other peoples' work.

I used the code by Geek Mom Projects and edited it to use the Arduino Keyboard library (same link as above), so that it doesn't require a intercepting desktop application to process the gyro values and trigger key presses. (The code can work with a non-USB client Arduino (like the Arduino Uno), but you'll need that 'intercepting desktop application.')
So, the Arduino Leonardo reads the sensor data through I²C and calculates the raw values to obtain angle values (Geek Mom Projects' code; again, repeated links). Then, the Leonardo checks for specific angles to trigger keyboard presses and releases!
I really didn't do much here, only a several lines of code, but I figured it would be much more productive and fun to borrow the professional's work and tweak it a bit. Thank you Geek Mom Projects!

The game I demonstrated on is Minecraft.

19 comments:

  1. u done a great job !! wonderfull !!.. im very intrested to do this.. can give me the code...pls.. im beginer for this.. i cant get the code from the given website.. pls kindly help me...

    ReplyDelete
  2. my email id : chassisboy@gmail.com

    ReplyDelete
  3. can u send me plz the code into my email sayoojjsmail@gmail.com

    ReplyDelete
  4. Hi! Can you send me the code into my email please? gabrielfigueiredov@gmail.com
    You done a great job, I'm interested in doing arduíno projects but this one is very hard to me to do. Sorry about my english. I'm brazilian

    ReplyDelete
  5. Hi! Excellent job and very productive guide for people like me. Can you please share your code with me if thats no problem for you?

    My e-mail is: ozincir@gmail.com

    Thanks in advance!

    ReplyDelete
  6. Please share your code, im a beginner, great job. mail: franganador@gmail.com

    ReplyDelete
  7. Hi! I am doing the same project. Could you send me the code you made, please? That would help me a lot. Thank you! pauli.kappi@gmail.com

    ReplyDelete
  8. Hello!
    Please, can you share your code with me? That would help me a lot cause I´m doing almost the same thing for my thesis :) My email is m.hlacikova@gmail.com.
    Thanks a lot!

    ReplyDelete
  9. Hi!, I do work on Unity 3D, I want to try same kind of controller in one of my game application.Can you please share the code I am self-taught in Arduino area. If it possible can you share the code, My email Id: dilippatil2010@gmail.com

    ReplyDelete
  10. Can I get the arduino and processing code for your device? Thanks! My email is johnnyboy1065@yahoo.com

    ReplyDelete

  11. Hi, Congratulations on your work. It was very good!
    Could you send your .ino file to my email: brennobaldino@id.uff.br?
    It would help me a lot in my completion work.

    ReplyDelete
  12. Hi this is very good, could i get the code please? amadeokusch@gmail.com

    ReplyDelete
  13. Hey, I would like to implement this on my project would you bebkind enough toto sha the code with me.
    Email: shreyasmaheshwari1997@gmail.com

    ReplyDelete
  14. Hello
    Can u send me code pls on mail: Roman23zy33@yandex.ru

    ReplyDelete
  15. Hello, good afternnon.
    Can u send me the code please on my mail: miguelmassiris@gmail.com.
    Thanks!

    ReplyDelete
  16. If you ever want to change or up your university grades contact cybergolden hacker he'll get it done and show a proof of work done before payment. He's efficient, reliable and affordable. He can also perform all sorts of hacks including text, whatsapp, password decrypt,hack any mobile phone, Escape Bancruptcy, Delete Criminal Records and the rest

    Email: cybergoldenhacker at gmail dot com

    ReplyDelete
  17. Helloo!can you share me code and schematics of this project Arduino Leonardo + MPU6050 G21 on my email.
    razamoqeem@gmail.com

    ReplyDelete
  18. Helloo!can you share me code and schematics of this project Arduino Leonardo + MPU6050 G21 on my email.
    keciosantos@hotmail.com.br

    ReplyDelete