Hi everyone,
New to the Arduino. My son and I would like to find out if anyone has a basic sketch for an Adafruit Servo Shield controlling 1-3 servos. I understand the code for a single servo wired directly to the Arduino and have no problems. But I am having a problem trying to understand the code that is on the tutorial for the shield. I understand most code but I can't wrap my head around this for some reason. The only movement I get from the servo sketch is slight movements until it hits its limit and stops. It is a TowardPro MG996R. LCDs, steppers, LEDs, etc.. I'm good with. This is driving me a little nuts. Any help or advice would be much appreciated.
Thanx,
Chris & Aaron
Basic Sketch for Servo Shield
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23938
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Basic Sketch for Servo Shield
Two questions, does your servo work when you wire it directly into the Arduino and have you tried some of the examples (or this http://learn.adafruit.com/3d-printed-an ... robot-head)
- adafruit_support_bill
- Posts: 88140
- Joined: Sat Feb 07, 2009 10:11 am
Re: Basic Sketch for Servo Shield
The example code that comes with the library sequences through all 16 channels and sweeps each servo back and forth. Does that code work for you?
-
- Posts: 4
- Joined: Tue Jan 28, 2014 11:23 pm
Re: Basic Sketch for Servo Shield
Hey guys,
Sorry it took me so long to reply. Yes, the servo works when I have it wired to the Arduino directly. I can run the example sketches in the software. Sweep, Knob, etc... When I use the servo shield with the Adafruit 'servo' sketch it just rotates ccw at like 30° increments until it hits the stop. I have another mini servo from Radio Shack that just goes ballistic and slams into the stop and starts grinding like mad. I have the servo connected to pin set 0.
Sorry it took me so long to reply. Yes, the servo works when I have it wired to the Arduino directly. I can run the example sketches in the software. Sweep, Knob, etc... When I use the servo shield with the Adafruit 'servo' sketch it just rotates ccw at like 30° increments until it hits the stop. I have another mini servo from Radio Shack that just goes ballistic and slams into the stop and starts grinding like mad. I have the servo connected to pin set 0.
- adafruit_support_bill
- Posts: 88140
- Joined: Sat Feb 07, 2009 10:11 am
Re: Basic Sketch for Servo Shield
Good. That rules out a problem with the servo.the servo works when I have it wired to the Arduino directly.
Definitely sounds like a problem with the servo shield. If you can post some clear photos of the front and back of the shield we'll check for any assembly issues.When I use the servo shield with the Adafruit 'servo' sketch it just rotates ccw at like 30° increments until it hits the stop.
-
- Posts: 4
- Joined: Tue Jan 28, 2014 11:23 pm
Re: Basic Sketch for Servo Shield
Please see attached. I have no solder bridges and everything is pretty sano.
- Attachments
-
- Assembly
- P1010675.JPG (420.44 KiB) Viewed 404 times
-
- Top View
- P1010674.JPG (460.81 KiB) Viewed 404 times
-
- Bottom View
- P1010673.JPG (415.31 KiB) Viewed 404 times
- adafruit_support_bill
- Posts: 88140
- Joined: Sat Feb 07, 2009 10:11 am
Re: Basic Sketch for Servo Shield
I don't see any problems there. If you contact [email protected] with a link to this thread we can send you out a new shield.
-
- Posts: 4
- Joined: Tue Jan 28, 2014 11:23 pm
Re: Basic Sketch for Servo Shield
Will do. Thank you for your assistance.
Please be positive and constructive with your questions and comments.