Using Servo On or Not on D9/D10?

Hello, I'm new.

I have trouble understanding this segment in the servo manual:

The Servo library supports up to 12 motors on most Arduino boards and 48 on the Arduino Mega. On boards other than the Mega, use of the library disables analogWrite() (PWM) functionality on pins 9 and 10, whether or not there is a Servo on those pins. On the Mega, up to 12 servos can be used without interfering with PWM functionality; use of 12 to 23 motors will disable PWM on pins 11 and 12.

I don't get it if I Should or Should Not use pins 9 and 10?

I can translate it as 9/10 are then reserved for servo library or that 9/10 cannot be used with servo library.

Nano Every.

Thank you.

Welcome to the forum

You can use pins 9 or 10 on a Uno to control a servo

What the quote is saying is that using the Servo library with any pins will disable the PWM functionality of pins 9 and 10 on a Uno and pins 11 and 12 on a Mega if more tha 12 servos are used

The confusion probably arises because there is a common belief that servos can only be used with PWM capable pins, which is not the case. Any GPIO pin can be used, including teh A* pins

1 Like

I don't think it means either of those things.

I think what it is saying is that you cannot use one of the functions that pins 9, 10 normally have, which is the ability to produce PWM signals. The other functions of those pins (as digital input or output) are still available.

The advice you have read was probably all written before the Every was introduced, any may not apply to it.

Good point

1 Like

Would this mean that the Servo library (pwm?) is still usable on pins 9 and 10?

Yes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.