Pages: [1]   Go Down
Author Topic: How to use Arduino input to emulate touch on Android?  (Read 645 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm attempting to configure a MakeyMakey (Arduino board) connected to a rooted Nexus 7 running CyanogenMod 10.1 for a custom gaming interface. I need the MakeyMakey to emulate touch inputs within Android, but it currently is only able to emulate standard keyboard functions (W,A,S,D,←,→, ect.).

I have been able to successfully emulate touch functions on the device within an adb shell, so I know the code/script I need run, but I have no knowledge of how to specifically map or trigger it with the inputs of the MakeyMakey or through an Ardunio.

I'm unsure if this feasible, or what type of direction I should point myself in. I'm willing to learn whatever if necessary, but I'm having trouble determining which area to focus on since I've been exhausting all the alternatives.
« Last Edit: January 22, 2013, 12:53:17 am by Resslx » Logged

Maine
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
 I'm not positive, but it appears we may have the same problem viewed from opposite ends of the solution...   I began with the new Arduino Esplora http://arduino.cc/en/Main/ArduinoBoardEsplora and have been searching for games it will work with, while you appear to be starting with the games and are searching for controllers to use with them.
   I've had relative success on the gamepad side, but have been somewhat lost on the software side.
   Because the new ATMega32u4 chip allows for USB emulation (something ATMega328 boards like the Uno lacked) new possibilities have opened up in the realm of gamepad emulation.  Possibilities that would not have been possible before the release of the Arduino Leonardo less than a year ago.  However, because of this its been difficult to find updated documentation, as most of the code libraries and tutorials will have been written for the Uno.
    The EsploraKart example is the closest I can get to a pure Arduino Gamepad w/Keystroke emulation so far.  It uses Keyboard Modifiers via the Mouse and Keyboard libraries created for the Leonardo, Micro and Esplora. http://arduino.cc/en/Reference/KeyboardModifiers
 I posted a list of games and platforms on which I've managed to get the Esplora to work with on this thread- http://arduino.cc/forum/index.php/topic,143891.msg1087281.html#msg1087281
   The only problem with the Esplora comes when you want to use it like a six axis gamepad for anything beyond 2nd or 3rd gen gaming consoles...  In the hopes of playing Android games like Modern Combat 3 and GTA3 I've been trying to use an Arduino Leonardo to function as a HID Controller to map a Wii Classic Controller through a nunchuck adapter and a USB OTG cable.  Normally, I would just use the WiiMote through Bluetooth but that function seems to be broken on the current version of Android 4.2.1. 
  So my guess is there's a lot more that can be done in the area of ATMega32u4 Gamepad Support.  It may take some time to sink in though...
Logged

Pages: [1]   Go Up
Jump to: