Arduino Nano PWM and Servo Control Capabilities

I am trying to control two motors and three servos using an arduino nano. When I hook up the motors using the pwm pins everything works great. When I add the line to my setup function: "myservo.attach(2) " I lose the ability to use PWM for one of my motors.

I am using pins 5,6,9,10 to control two motors bi-directionally using an L293 Driver so there is no concern with current draw. The servo is being powered using a 7805 voltage regulator from my supply. I can control the servo just fine, but lose my PWM control when I enable it.

I lose PWM on pins 9 and 10 to be more specific.

Any thoughts?

Yes that will happen because the servo library uses the same timer as those two pins. Nothing you can do about it I am afraid apart from using a bigger system line a Mega.

Would the the Uno be capable of controlling 4 pins using PWM and 3 pins as servos?

Yes. In fact you loose 2 PWM pins when you use the servo but the number of servos can be anything up to 12.

So to clarify, the Uno is capable of 6 PWM outputs, but when using servos, each servo consumes 2 PWM pins. Therefore the Uno would not be compatible and I would need a MEGA?

each servo consumes 2 PWM pins.

No - the entire servo library cost you two pins that is for up to 12 servos. Using any less that 12 does not change this.

So Changing from Pins 9&10 to 3&11 would fix the problem and enable me to use PWM for my motor controls as well as enable me to control servos as well? I could attach servos to Pins 2,4,7 and make this work?

I would have thought so.

Thanks so much for the input, I will attempt to re-wire tomorrow and if not will end up using the Mega.

--So far, as of 3/7/2013 I have tested and it Works! Note I have only tried with 1 servo, but I think that it will not be a problem now