Servo myservoA; // create servo object to control a servo
int leftright = A0;
int updown = A1;
myservoA.attach(3); // attaches the servo on pin 3 to the servo object
//Read a value - convert from 0..1023 to 10..170 degrees- and send to servo
int v0 = analogRead(leftright);
int s0 = map(v0,300,600,10,170);
//again for the second joystick & servo - go 90 to 170 degrees - we don't want hit the table
int v1 = analogRead(updown);
int s1 = map(v1,0,1023,90,170);
The power wire is typically red, and should be connected to the 5V pin on the Arduino board.
The ground wire is typically black or brown and should be connected to a ground pin on the Arduino board.
The signal pin is typically yellow, orange or white and should be connected to a digital pin on the Arduino board.
VRx: x-axis manipulation
VRy: y-axis manipulation
SW: switch (will not be using this pin)