Oswald Joystick Interface, in Java
This is a temporary page for CS162 students to access the joystick on the OSWALD through java. This requires no extra libraries, it just opens the joystick device and reads data in. To use this on your oswald, please use the OswaldInterface class, as it will be the easiest. When a joystick is created on a system without a joystick, a little interface will pop-up allowing the user to shake one of the joystick axes. This will simulate a shake.
If you are having problems with your gui (or the oswald test shaker) locking up while you are waiting for input, use the ThreadedActionListener? class that is attached.
Api: http://web.engr.oregonstate.edu/~goskab/joystick_javadoc/
Note:
Integer values for corresponding arrow key directions to be used in the getButton method in the OswaldInterface? class.
- 37 - Left
- 38 - Up
- 39 - Right
- 40 - Down
Downloads
Oswald Interface Classes
Threaded Action Listener
Attachments
- Joystick.java (2.5 kB) -
Joystick access class
, added by goskab on 05/13/09 08:09:37. - OswaldInterface.java (1.4 kB) -
Oswald abstraction layer
, added by goskab on 05/13/09 08:10:09. - OswaldInterfaceTest.java (1.0 kB) -
Oswald "emulation" gui
, added by goskab on 05/13/09 08:10:33. - Tester.java (257 bytes) -
A sample of how to use this
, added by goskab on 05/13/09 08:10:56. - JoystickInterface.zip (2.8 kB) -
All of the java files zipped up
, added by goskab on 05/13/09 08:14:12. - ThreadedActionListener.java (1.0 kB) -
Threaded action listener to help with swing problems
, added by goskab on 05/18/09 09:21:57. - ThreadTester.java (1.4 kB) -
Test class to show how to use ThreadedActionListener?
, added by goskab on 05/18/09 09:22:26.

