I have an Adaruit Motor Shield v2, and a Tower Pro SG92R micro servo. I've got it setup so the shield works with my Arduino Uno, and I've successfully tested using other types of motors on the shield. I could not find any sample code for working with a servomotor though. The shield has two dedicated spots for a servo (labeled "Servo 1" and "Servo 2"). I'm planning to use wall wart transformer to power the motor separately from the Arduino. Any pointers/links to documentation/sample code would be appreciated.
1 Answer
On the Motor shield the servo headers are directly connected to pins 9 and 10 (I think 9 is servo 2 and 10 is servo 1). So you can use the standard servo examples using pins 9 and 10.
If you need to power the servos with an external power supply you must cut a trace on the back of the board -- the silk screen tells you where to cut. Then you need to connect power to the "Opt Servo" input.
The power to the servos is not changed by the power jumper used for the DC/stepper motors.