Analog Joystick 5 Pins Tinkerkit Sensor Shield

I have an Arduino Uno with a Tinkerkit Sensor Shield and want to connect an analog joystick.

My joystick has a 5 pin connection and I don't understand how to attach it to the outputs of my sensor shield.

The pins on the joystick say GND, +5V, JRx, JRy and SW (if that helps).

Can anyone explain this or point me to a tutorial on the subject?

I have very little experience with electronics.

Thanks,

Calum

Does the joystick have a (Red) "Fire " button" on it ?

The joystick is a thumbstick which if pressed down actuates a push button (SW pin on stick).

This is the joystick I purchased:

http://hobbycomponents.com/index.php/arduino-compatible-analogue-joystick-controller.html

Looks to me as if the analog inputs on the Tinkerkit consist of 3 pins each. I suspect that 2 are power (5V and GND) for the sensor, and the other is a standard Arduino analog pin. You will need to look at the documentation to see which pin is which: you may be able to follow the traces on the board. The pins may even be marked.

A joystick is 2 analog sensors in one, namely X and Y co-ords. It consists of two potentiometers, one for each axis. GND and 5V go to the ends of each pot, and the analog output is from the moving wiper. It outputs 0V when at one end, 5V when it's at the other, and something in between the rest of the time. Once you have identified which of the 3 Tinkerkit pins is the actual analog pin, take the JRx wire to one of those analog inputs and the JRy wire to another (ie the analog pin on another set of 3). Then take the joystick 5V and GND pins to the 2 appropriate pins of a set of 3 to power the joystick.

Then take the SW to a digital pin if you need a "fire" button.

I think.... :smiley:

EDIT... you should be able to identify the 5V pins on the Tinkerkit with your multi-meter.

MORE EDIT.... you might be able to tell from a real Tinkerkit sensor which wire is which. The power may well be red and black, the signal being yellow or orange.