Hi everyone, beginner here so i don't know a lot but I think I know the simple code to control servos with a potentiometer with only an arduino uno and a breadboard, but I am confused when it comes to the pca9685.
So is there a way to control servos with pot while using the adafruit servo library? If so, can I use the same code as the DroneHow vid? Also what is wire.h?
But how tho, all the vids on yt I see when they r controlling multiple servos they r using some thing like pca9685 or a breadboard.
By connecting servos directly to the arduino do you mean soldering or is there other way to connect servos to the arduino uno without breadboard or soldering?
A PCA9685 and a breadboard are completely different things. One is a passive device and the other an active device. As AWOL has pointed out you can easily connect servos to a Uno using jumper wires. However, you must use an external power supply for the servos as the Uno cannot supply enough current, but you were going to do that anyway, weren't you ?
There are two options for operating four (or more, or less) servos.
One is to use software - a servo library - to cause the UNO to laboriously generate all the pulses required for the servos. This means the code is very "busy" and it may or may not be practical to do various other things at the same time - the code to drive the servos may interact with other tasks and vice versa.
The PCA9685 is a hardware device with 16 channels available to generate servo control pulses - or PWM (which is not the same as servo pulses) quite independently of the Arduino. You issue commands to it via the I²C interface - which means you have to use the "Wire.h" library which implements I²C - and you use a different library to instruct the PCA9685 to specifically generate the servo pulses.
Each time you issue a servo command to the PCA9685, it automatically continues to send the servo control pulses for that position with no action from the Arduino until you wish to command a different position. You are not using the servo library to cause the Arduino to generate the pulses.
OHHHHHHH I see, so you meant that I can connect the 4 servos signal and ground wires directly to the arduino signal and ground pins and the 5v wires of the servos connect to the external supply?
Sry but i still don't understand how to do this. If i connect my external power supply to the 5v and gnd pin of the arduino, where do i connect the 5v wire of the servos as theres only 1 5v pin in the Arduino uno
sry for bad drawing but what i was saying is, theres no more slots to connect with the power supply since its only 2 wires is already connect to arduino uno board.
If you do have a power supply with a coaxial connector on it, you want one of these:
You probably could get five servo wires (plus the Arduino power wires) into each of the screw openings.
Also, you need to run the control wires alongside the other wires, you do not want to have them separate as this allows pickup of interference which may upset the operation of your whole system.