motor shield servo not working

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
berko
 
Posts: 67
Joined: Sat Aug 04, 2012 6:44 pm

motor shield servo not working

Post by berko »

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

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield servo not working

Post by adafruit_support_bill »

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.

User avatar
berko
 
Posts: 67
Joined: Sat Aug 04, 2012 6:44 pm

Re: motor shield servo not working

Post by berko »

And to make that work I just change the pin from pin9to pin10?

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield servo not working

Post by adafruit_support_bill »

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.

User avatar
berko
 
Posts: 67
Joined: Sat Aug 04, 2012 6:44 pm

Re: motor shield servo not working

Post by berko »

ok, that did the trick.
its works while connected to servo2 (as labelled on the board) and in the sketch:

Code: Select all

myservo.attach(9);
connected to "servo1" and pin10 also works.
isn't that backwards?

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield servo not working

Post by adafruit_support_bill »

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

User avatar
berko
 
Posts: 67
Joined: Sat Aug 04, 2012 6:44 pm

Re: motor shield servo not working

Post by berko »

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

Re: motor shield servo not working

Post by robnapier »

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?

User avatar
adafruit_support_bill
 
Posts: 88154
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield servo not working

Post by adafruit_support_bill »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”