Author Topic: need Java source code to use wireless Xbox controller  (Read 3525 times)

0 Members and 1 Guest are viewing this topic.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
need Java source code to use wireless Xbox controller
« on: July 12, 2010, 10:15:07 AM »
I'm looking to control our robot fish with an Xbox controller . . .

I'm still a bit open on the platform, but I think my team has mostly decided on using Java.

The wireless Xbox controller links up to a PC using USB, so the Java code would need to read in the data from the com port and interpret it into useful information. A GUI/PC must be involved, so it cannot be a direct controller-robot link.

I've browsed google for half an hour with no luck finding such source code . . . anyone know of any? We can figure it out if we have to, but I was hoping to save a week of coding :P


ps - I found C++ Xbox code, in case anyone is interested:
http://www.codeproject.com/KB/directx/xbox360_cont_xinput.aspx

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: need Java source code to use wireless Xbox controller
« Reply #1 on: July 12, 2010, 01:58:20 PM »
which operating system?
you should be able to find an HID driver for Xbox controllers.
then just treat it as a standard HID device.


dunk.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: need Java source code to use wireless Xbox controller
« Reply #2 on: July 12, 2010, 03:06:59 PM »
Windows (XP and later)

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: need Java source code to use wireless Xbox controller
« Reply #3 on: July 12, 2010, 04:03:02 PM »
Windows (XP and later)
hmm. Windows and Java.
well that rules all my experience out.

search for a driver that allows you to use the Xbox controller as an HID device.
i presume there are Java libraries that can read HID devices.


dunk.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: need Java source code to use wireless Xbox controller
« Reply #4 on: July 12, 2010, 06:21:14 PM »
Java had all of its serial support dropped quite a while ago but there is a library out there called 'rxtx' which I use in GaitDesigner.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here