Arduino + Java + Joystick
posted Nov 19th 2010 12:00pm by Mike Szczysfiled under: arduino hacks

Interfacing your own hardware with a Java app couldn’t be easier than this example. [Pn] created this proof-of-concept using an Arduino, an analog joystick from a gaming controller, and a few lines of Java code. The Arduino reads an ADC value from the joystick’s x-axis and transmits it over the serial connection ten times a second. The Java program triggers on every serial event, parsing the data based on the @ symbol that the Arduino sends as a start and end condition.
We like this kind of example because there’s nothing extra involved. It lets you take the concept and run with it in any project imaginable. Be it a more complicated Joystick, or simple sensors that you’d like to interface with.






Nicely written project. I beg to differ regarding the easiest way to do this. If you don’t already have a ready made Arduino then Byron is way simpler as it uses the OS’s built in HID driver for USB and will happily enumerate itself as a joystick or keyboard or whatever.
http://1010.co.uk/org/byron.html
I’ve used this a couple of times. It’s great and just works for up to 6 analog channels.