I hope I'm missing something obvious. I have a motor shield N06DH (Motor Shield - LinkSprite Playgound) and I want to use it to power 2 DC motors and servos. The trouble seems to be that the N06DH uses pins 9 and 10 to control the DC motor outputs and the servo library Servo - Arduino Reference disables analogWrite on pins 9 and 10. This seems to mean, I think, that if I use the servo library, I can't use the shield to drive the DC motors (even though the shield documentation says you can drive servos from it).
Am I right? If so, is there a reasonably easy work-around? If not I think I'll take it back to Maplins.
Yes you are right, the Uno has only one 16 bit timer (needed for the servo library) and
that is connected to pins 9 and 10. The Mega will be able to handle it though I think
(but double check which pins are driven by which timer and look at the sources to the
Servo library to confirm which timer is uses first).
If the motordriver.h file from the library you are using designates the power pins as 9 & 10 you can just change the values to 3 and 5 for the power pins in the .h file. Then in your sketch connect servo to pin 7. You can also attach a ping to 6. It works with a Seeed motor shield and motordriver library.
Thank you both for your helpful replies. Balexs, if you mean a library to control the DC motors, I'm not using one at all. The shield came with sample code saying that pins 8 to 13 are used for the 2 DC motors or 1 stepper - it didn't give any option for changing this. I take this to mean that the shield has hard-wired the H-bridges to pins 8 to 13.
MarkT, thanks for answering the question that I didn't ask, but did mean to ask, which was of course "why?". Servo.h does say that 16 bit timer is required and Arduino Playground - TimerPWMCheatsheet says that it's on 9 and 10.
In addition to all this, I can only get access to the other pins by bodging connections to grove connectors, so I think I chose badly and will take it back.