const int PWMA = 3; // speed and direction control motor A (left)
Note that analogWrite of PWM on pins 3 and 11 is disabled when the first servo is attached
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.
Timer 2 uses pins 11 and 3.
I may be wrong but the statement in Reply #3 "Timer 2 uses pins 11 and 3" seems to me easier to assimilate than the diagram in Reply #5
There are many ways for the representation of knowledge; who knows who likes what! Figure of Post#5 aims at amplifying the information of Post#3 through visualization which "has been an effective way to communicate both abstract and concrete ideas since the dawn of humanity".
Code: [Select]const int PWMA = 3; // speed and direction control motor A (left)From the ServoTimer2.h file:See a problem there? It never hurts to read the documentation for libraries that you use.Read the how to use this forum-please read sticky to see how to properly post code and some advice on how to ask a good question. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code.