More motorshield Issues

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
bmckee
 
Posts: 10
Joined: Wed Aug 24, 2011 4:44 am

More motorshield Issues

Post by bmckee »

So not having any luck with my stepper motors (http://forums.adafruit.com/viewtopic.ph ... 50#p119050) Ive moved onto trying to get some servos to work. yet more problems come about. When I use this code through the shield the servos just twitch about however the same code works just fine when running through just the arduino off pin 9 , +5 and Ground. its just the basic sweep code:

Code: Select all

// Sweep
// by BANNED <http://BANNED.com> 

#include <Servo.h> 

Servo servo1;  // create servo object to control a servo 
Servo servo2;
int pos = 0;    // variable to store the servo position 

void setup() 
{ 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object 
} 

void loop() 
{ 
  for(pos = 0; pos < 180; pos += 1)  // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
  } 
  for(pos = 180; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees 
  {                                
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
  } }
Any help would be appriciated. I've tried running a separate 5v power supply to the shield with the same problem

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

Re: More motorshield Issues

Post by adafruit_support_bill »

Most likely an intermittent connection from a bad solder joint. The shield just passes through pins 9-10, +5 and GND for the servo headers.

If you post photos of the front & rear of the board we'll have a look for any assembly issues.

User avatar
bmckee
 
Posts: 10
Joined: Wed Aug 24, 2011 4:44 am

Re: More motorshield Issues

Post by bmckee »

My servo's where both shot... bad luck.

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

Return to “Arduino Shields from Adafruit”