Hello,
I just finished getting the motor shield soldered up and just trying to get a servo running (starting simple, i thought).
i am powering my UNO via usb, the sketch is uploading without error (tried both example > servo > sweep and knob).
i have the power jumper in place (as i thought the tutorial said that was fine for using a servo) and the power light lights up on both the UNO and the shield.
When i first plug the UNO in via USB the servo makes a little movement that lasts a few microseconds as if to BANNED me and say, i am getting power, but ha ha you can't control me.
it is taunting me.
any ideas on where to start trying to figure out what is happening.
i am using the smaller servo that came with the motor party pack (tower pro SG92R).
thanks for any help you can give.
-jon
motor shield servo not working
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: motor shield servo not working
First thing to try - move the servo connector to the other servo header on the shield.
If that doesn't work, post photos of the front & back of the board and we'll check your assembly.
If that doesn't work, post photos of the front & back of the board and we'll check your assembly.
- berko
- Posts: 67
- Joined: Sat Aug 04, 2012 6:44 pm
Re: motor shield servo not working
And to make that work I just change the pin from pin9to pin10?
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: motor shield servo not working
Just move the connector without changing the code. There was an error in one of the examples that mislabeled the pins. Let's rule that out before looking further.
- berko
- Posts: 67
- Joined: Sat Aug 04, 2012 6:44 pm
Re: motor shield servo not working
ok, that did the trick.
its works while connected to servo2 (as labelled on the board) and in the sketch:
connected to "servo1" and pin10 also works.
isn't that backwards?
its works while connected to servo2 (as labelled on the board) and in the sketch:
Code: Select all
myservo.attach(9);
isn't that backwards?
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: motor shield servo not working
Yes that is backwards. We need to fix the docs. Sorry for the confusion.
- berko
- Posts: 67
- Joined: Sat Aug 04, 2012 6:44 pm
Re: motor shield servo not working
no problem. thanks for the help.
next up...getting a battery pack for the other motors and getting those working.
more questions to come i am sure.
happy holidays.
-jon
next up...getting a battery pack for the other motors and getting those working.
more questions to come i am sure.
happy holidays.
-jon
- robnapier
- Posts: 4
- Joined: Fri Jan 25, 2013 9:47 pm
Re: motor shield servo not working
I'm using MotorParty and Sweep, which both indicate that they use pin 9. Looking at the board, it indicates that pin 9 is "S1". But I have to connect to Servo 2 to work. Does this mean the silkscreen on the board is incorrect?
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: motor shield servo not working
Yes. Servo 2 is pin 9 and Servo 1 is pin 10.
Please be positive and constructive with your questions and comments.