For my humanoid robot, I am trying to connect 6 servo motors to the servo driver and for now I wanted to control two servo motors. For some reason my code doesn't seem to be working and I am not sure why this is the case? I am very new to Arduino code, so help would be appreciated.
Are you sure your code doesn't work? Post your code with code tags, not as picture. What servos do you use? What do you power the robot with? Just don't tell me, that with these little R6 batteries (size AA). Also post a wiring diagram.
Thanks for pointing out the servos being plugged in wrong. What I meant by it doesn't seem to be working is the actually code that I upload into the Arduino UNO. I have done a code to move servo 0 and 2, but they are not moving. That is the main issue here.
The servos wont move when they're plugged in wrong. If it still doesn't work when you correct that have you tried the Adafruit example program "servo"? If nothing works with that you probably have some connections wrong.
4 x AA batteries should be good enough to run 2 servos but you'll probably need something better to run six.
the frequency is 60Hz? Working frequency on PWM signal for servo motor is 50Hz.
The robot looks big to me. Are these servos strong enough? For power supply I would recommend 2x18650 (in serial) and step down DC DC converter for 5 volts - for Arduino Uno and all servo motors. Also in your photo it seems that you have connected the power supply of PCA9685 incorrectly - an orange cable from Arduino goes to IN +. You must wired Arduino 5 volts to the Vcc on PCA9685.