Need help with programming a robotic arm with a minimum of 3 servos

To be honest I don't know how to use the ps2 controller but I can show you how to move your servos.

To control a servo you will need to use all three wires coming from it. The yellow one should be connected to a pwm pin on your Arduino. The black wire is ground and the red is live. You will need a 5v power supply. If you try to pull power from you Arduino you will destroy it. A battery pack or a wall wort should do the trick. Simply put the positive wire from the power source to the positive wire of your servo. Do the same with the ground wire.

Try just one servo to start with and use the code below. Once you get it working try to adapt the program to control 6 servos if you can't I will show you how.

#include <Servo.h> 
 
Servo myservo



 
void setup() 
{ 

  myservo.attach(9); // plug the servo into pin 9

} 
 
void loop() 
{ 
  
 
myservo.write(45);  

delay(1200);

myservo.write(180); 

delay(1200); 
}