How to emulate Android touch input using Arduino?

I am trying to customize a UI with MakeyMakey and Construct 2 via an embedded Nexus 7 running CyanogenMod 10.1.

I've created a robot that uses a Nexus tablet instead of its face. Players will then be able to interact with the robot, touching various parts of its body and ending with chains associated with MakeyMakey.

I am also developing a game with Construct 2, allowing players to play like a robot using its arms, legs, and other buttons to control it. AppMobi and CocoonJS are the two current platforms available for exporting mobile apps from Construct 2.

Unfortunately, both platforms only support touch input and MakeyMakey only outputs standard keypress functions (W, A, S, D, ←, →, ect.). I am struggling to find a way to make MakeyMakey replace touch input or game communication.

I went to developers for mobile platforms and they have no ETA when adding such external inputs.

I found I can run a shell script to emulate touch input directly on the device:

sendevent dev/input/event0 3 57 56
sendevent dev/input/event0 3 48 4
sendevent dev/input/event0 3 53 1266
sendevent dev/input/event0 3 54 34
sendevent dev/input/event0 0 0 0 
sendevent dev/input/event0 3 57 4294967295
sendevent dev/input/event0 0 0 0

      

Though, dont know how to run such a script with a key press tied to MakeyMakey.

I found that Tasker for Android can run a script (!), But the application cannot detect keystrokes and therefore I have no way to start the task.

I feel like digging into Ardunio's code, and trying to customize MakeyMakey itself might be the best way, but I'm not sure if it can potentially emit touch events or if Tasker recognizes key presses .

An overview of the my setup

+3


source to share





All Articles