PS3 Thumbstick without breakout board

Hello everyone,

I'm kind of new in the world of electronic and arduino, and i'm trying to use a thumbstick from my old ps3 controller without using a breakout board.
I found this schematic online :

I only want to use the 2 potentiometers of the thumbstick, i don't really care about the pushbutton in it, so i wired my thumbstick as mentionned in the schematic, connected this way :

Joystick wire > arduino
A > +5v
C > GND
B > analog input 2
D > analog input 3

The problem is that the values doesn't change when i'm moving the stick, it either stay at 0 for both valx and valy or at 1023 if i connect the A wire to the GND and the C wire to the +5V.
I think there might be some resistors to use but i wasn't able to find any information about that on the internet.

Here is my code :

int potPin = 2;
int potPin2 = 3;
int valx = 0;
int valy = 0;
void setup() {
pinMode(potPin, INPUT);
pinMode(potPin2, INPUT);
Serial.begin(9600);
}

void loop() {
valx = analogRead(potPin);
valy = analogRead(potPin2);
Serial.print("valx = ");
Serial.println(valx);
Serial.print("valy = ");
Serial.println(valy);
delay(1000);
}

So if anyone has a clue, or any link helping me make it work without a breakout board i'd be really grateful :slight_smile:

PS : I'm french so i may not have use the right terms in this post, don't hesitate to ask me questions or correct me !

Thanks in advance and have a great day :slight_smile: