motor shield servo not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

motor shield servo not working

by berko on Thu Dec 20, 2012 11:35 pm

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 tease 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
User avatar
berko
 
Posts: 61
Joined: Sat Aug 04, 2012 6:44 pm

Re: motor shield servo not working

by adafruit_support_bill on Fri Dec 21, 2012 6:46 am

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.

adafruit_support_bill
 
Posts: 40177
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield servo not working

by berko on Fri Dec 21, 2012 9:56 am

And to make that work I just change the pin from pin9to pin10?
User avatar
berko
 
Posts: 61
Joined: Sat Aug 04, 2012 6:44 pm

Re: motor shield servo not working

by adafruit_support_bill on Fri Dec 21, 2012 10:11 am

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.

adafruit_support_bill
 
Posts: 40177
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield servo not working

by berko on Fri Dec 21, 2012 11:25 pm

ok, that did the trick.
its works while connected to servo2 (as labelled on the board) and in the sketch:
Code: Select all | TOGGLE FULL SIZE
myservo.attach(9);


connected to "servo1" and pin10 also works.
isn't that backwards?
User avatar
berko
 
Posts: 61
Joined: Sat Aug 04, 2012 6:44 pm

Re: motor shield servo not working

by adafruit_support_bill on Sat Dec 22, 2012 3:10 pm

Yes that is backwards. We need to fix the docs. Sorry for the confusion.

adafruit_support_bill
 
Posts: 40177
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield servo not working

by berko on Sat Dec 22, 2012 5:05 pm

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
User avatar
berko
 
Posts: 61
Joined: Sat Aug 04, 2012 6:44 pm

Re: motor shield servo not working

by robnapier on Fri Jan 25, 2013 9:49 pm

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?
robnapier
 
Posts: 1
Joined: Fri Jan 25, 2013 9:47 pm

Re: motor shield servo not working

by adafruit_support_bill on Sat Jan 26, 2013 7:34 am

Yes. Servo 2 is pin 9 and Servo 1 is pin 10.

adafruit_support_bill
 
Posts: 40177
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.