Joystick Questions?

Hello, Does anyone know of a joystick/game controller library that I can import into the arduino? I know there is a arduino joystick, but I am looking to use a joystick from a controller that is plugged into my computer, does anyone know how i could do this?

is it usb or a gameport joystick?

The controller I am using is a Logitech Dual Action controller, The controller is plugged in by USB. I am using an Arduino Uno.

to connect usb stuff to your arduino you'll need the usb host shield, which you can find here

or you'll have to figure out a way to handle the usb yourself, which is not really possible i think

You can make a USB client with these chips using V-USB or easy way, buy a Teensy or Leonardo.
They make it possible/easy to make a stick or connect a gameport stick to a USB computer.

Are you trying to make the stick visible to a computer or interface a stick to Arduino?

I use joystick by connecting its pots and buttons directly to Arduino analog and digital ports. Needs a bit soldering, but is easy enough.

then why do you need a lib?

use analogRead() to determine the state of the analog joysticks, and use digitalRead() to determine the state of the buttons..
all those components are just standard electronics, you don't need any lib for that

Steen:
then why do you need a lib?

use analogRead() to determine the state of the analog joysticks, and use digitalRead() to determine the state of the buttons..
all those components are just standard electronics, you don't need any lib for that

My thought exactly!!!

Are you trying to connect that to a PC?