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