mini thumb slide joysticks

Has anyone here used one of these small resistive analog joysticks with an arduino?

It looks like it has four pins, two take power and two you could take a reading from, one for each axis. Other than that I know nothing about it. If anyone has any details on the wiring or code I'd use to take a reading from it, I'd be very grateful.

I think you just hook them up like two potentiometers, what i'm missing is the ground tab, maybe it's the big metal part in the center?

the center strip is probably connected to something, the sony psp uses one that looks like the same setup and it fits against the metal cage (or at-least in the 1000 models)

all else fails it's probably intended to be wired up like a rheostat

each pad is a "end" to a variable resistor (*2 for x and y)

that's a common joystick thing from the old days

apple //, c-64, and pc used that setup to change the clocks on 555 single shot timers, depending on how long the clock was high was representative of position

From the description:

"If you supply power to pins 2 and 4, you can use an ADC to read the other two pins for the x and y axis values."

Looks like pins 2 and 4 are the outer pins of both potentiometers wired in parallel. Pins 1 and 3 are the wipers. It sure would be nice if they told us the resistance.

I have used this mouse but it is not so sensitive and the centering I mean return to center is not precise. You can find the wiring at the link

Here is the my Arduino code

const int Left = 1;
const int Right = 2;
const int Up = 3;
const int Down = 4;

int xpin = 4;
int ypin = 5;

int xAxis;
int yAxis;
char* myStrings[]={"Left","Right","Up","Down"};
int button;

void setup() {
  Serial.begin(9600);
}


void loop() {
 xAxis=map(analogRead(xpin), 0, 1023, 0, 10);
 yAxis=map(analogRead(ypin), 0, 1023, 0, 10);
 
 if (xAxis < 4 ) { button = Left; }
 else if (xAxis > 6 ) { button = Right; }
 if (yAxis < 4 ) { button = Down; }
 else if (yAxis > 6 ) { button = Up; }
 if ( button > 0 ) Serial.println(myStrings[button-1]);
 button = 0;
 delay(50);
}

Thanks,
Nadir

How did you get those header pins on there? the holes on the back are very tiny.. did you solder directly onto the pads?

I mean return to center is not precise

Ive never seen an analog joystick that would (thus calibration)