Good afternoon,
i've got a problem using an RC joystick with arduino.
My plan is to create a rc controller, so i bought some 2 axis joystick from aliexpress (joysticks look professional) from this link here:
https://tr.aliexpress.com/item/4001292766834.html
The problem is that when i use analogRead Function the results are really unstable and they are not going from 0 to 1023, but into a very strict interval with variable range.
I tryed to figure out what's wrong, here down i let you my code:
//Inputs outputs
int throttle_in = A0;
int yaw_in = A1;
int pitch_in = A2;
int roll_in = A3;
int throttle_to_send;
int yaw_to_send;
int pitch_to_send;
int roll_to_send;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(A0,INPUT);
pinMode(A1,INPUT);
pinMode(A2,INPUT);
pinMode(A3,INPUT);
}
void loop() {
delay(1000);
// put your main code here, to run repeatedly:
throttle_to_send = analogRead(throttle_in);
yaw_to_send = analogRead(yaw_in);
pitch_to_send = analogRead(pitch_in);
roll_to_send = analogRead(roll_in);
Serial.print("\n\nREADING...\n");
Serial.print("\nThrottle: ");
Serial.print(throttle_to_send);
Serial.print("\nYaw: ");
Serial.print(yaw_to_send);
Serial.print("\nPitch: ");
Serial.print(pitch_to_send);
Serial.print("\nRoll: ");
Serial.print(roll_to_send);
}
and here's the schematics:
I used an Arduino NANO R3, for the schematic i used four potentiometer instead of two joystick, but i think it's the same (Joystick's resistors are 5Kohm).
All the ground wires are connected to arduino so i'm exluding this issue, but i don't really know how to solve this problem.


