![]() The daemon is started by the Java app as root, because it needs such permissions to read/write events directly from /dev/input/event N device drivers from the underlying Linux OS. It reads all its parameters from the compact settings file. ![]() pinball_buttons_mapper (aka the daemon) - this is the standalone C program, actually doing all the "real" job: it waits for keyboard events, and generates multitouch events (simulating finger touches on the screen). The diagram in this step is an UML class diagram, showing the principal classes and entities, and their relations. (*) see Architecture The final architecture is based on a daemon, that is, a small standalone program (written in C and hence very fast) communicating with a Java service. This proved slightly too slow and introduced a noticeable lag, so I opted for a daemon written in C, and configured by a Java app. Doing the above from Java (requiring only rooting, but no daemon).Generating multitouch events (*) from a small program written in C.Reading raw keyboard events from the PC, using adb and getevent.Studies Before ending up with the current design, a few studies have been made: Evaluate! Anyway, make a test before undertaking the project. Do not run apps requiring rooting, except if you know exactly what they're doing. IT IS VERY DANGEROUS TO USE A ROOTED TABLET, as malware could virtually access anything, including your personal data and online accounts. Rooting In order to read and send raw events, the application requires the tablet to be permanently rooted. Also, an Arduino with an USB host controller, and directly connected to pinball buttons, may work. Alternatively, Bluetooth keyboard may work, but I bet that the lag will badly impact the reactivity. BTW, Android well supports external USB peripherals such as hard drives, keyboards, mice, hubs, etc. Tablet connectors The tablet must have USB host capability, with an USB (or USB-on-the-go) connector. The SHIFT keys are detected and converted to touch events. The buttons are connected to an USB keyboard controller. This will insure a perfect compatibility with all pinball applications (and not only the seldom ones supporting an external keyboard). Events principle The principle I chose is to simulate finger touches. Before undertaking the job of building a cabinet, it is necessary to check that all conditions are met.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |