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.
-
1Does the standard servo example work?jippie– jippie2014年07月03日 05:00:34 +00:00Commented Jul 3, 2014 at 5:00
-
With the shield mounted on the Arduino, I don't have access to those pins. Also I if I understand correctly, that would not let the servo be powered by a separate power supply.Anssssss– Anssssss2014年07月03日 13:59:03 +00:00Commented Jul 3, 2014 at 13:59
1 Answer 1
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.
Explore related questions
See similar questions with these tags.