Controlling DC motor and servo simultaneously using servo library

I am a beginner and have a question about to control a(or more) servo motor(s) and ESC of DC motor simultaneously on an Arduino unit .
On an Arduino when using servo library servo PWM signal is present only on one output pin at a time .
Is that correct ?
Servo motors can be adjusted by sending servo PWM . If they receive no servo PWM signal they don't loose their position because of stall torque .
As I know the connected DC motor runs only as long as ESC receives servo PWM from Arduino and stops if no servo PWM is available .
As Arduino has only one servo PWM output and if there is need to adjust one servo motor while DC motor is running , how can you manage that the DC motor keeps on running during this servo motor adjustment ?
Best Regards

As you can see in the Servo library's documentation it uses Timer1 and the two PWM pin associated with it. The other four PWM pins can be used as usual.

The Servo library itself can handle a number of servos at a time, see documentation on how many exactly.

The PWM that controls a servo (which is produced by the Servo library) is very different from the PWM that is produced by the analogWrite() command to control the speed of a DC motor. It is unfortunate that the same acronym is used for two different things.

You can only use analogWrite() on the I/O pins marked as PWM pins. There are 6 PWM pins for analogWrite() on an Uno.

You can connect up to 12 servos to an Uno and they can be controlled from an I/O pin.

Note that if you are using a servo on an Uno the Servo library prevents the use of analogWrite() on pins 9 and 10.

...R

nur53:
how can you manage that the DC motor keeps on running during this servo motor adjustment ?

This thread can show you how to do that... Robin2 can probably help you along the way.

Demonstration code for several things at the same time

https://forum.arduino.cc/index.php?topic=223286.0

Addresses to my favorite tutorials on the same subject are the 1-2-3 at the bottom of my post in my signature space.

The lesson itself wherever you get it has the keys to coding automation on Arduinos. The lesson is old, it wasn't new in 1980, I can tell you that! By then it was how to code RT games on small home computers of the time.

nur53:
I am a beginner and have a question about to control a(or more) servo motor(s) and ESC of DC motor simultaneously on an Arduino unit .
On an Arduino when using servo library servo PWM signal is present only on one output pin at a time .
Is that correct ?

No. You attach() servos and ESCs to as many pins as you need (up to 12 on the basic Arduinos). You can write() to as many as you like at the same time (if you're being picky the commands will go out a few microseconds apart but they are effectively simultaneous).

And as already said we are not talking about the Arduino's hardware PWM. Servo "PWM" is slow and the library manages it itself.

Steve