#include <Servo.h> /** Adjust these values for your servo and setup, if necessary **/int servoPin = 3; // control pin for servo motor Servo myservo; // create servo object to control a servo // a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position

/** The Arduino will calculate these values for you **/int moveServo; // raw user inputint refreshTime = 20;long lastPulse = 0; // recorded time (ms) of the last pulseint angle=90;

// zoomkat 10-4-10 serial servo test// type servo position 0 to 180 in serial monitor// for writeMicroseconds, use a value like 1500// for IDE 0019 and later// Powering a servo from the arduino usually DOES NOT WORK.

void setup() { Serial.begin(9600); myservo.writeMicroseconds(2000); //set initial servo position if desired myservo.attach(7); //the pin for the servo control Serial.println("servo-test-21"); // so I can keep track of what is loaded}

thanks for the help guys, I'll be sure to run those when I get back. But if it still turns one way then its probably the servo's problem? Any idea what's in my code that could've made it keep turning one way? Could my extra refresh timing be causing it?

Not strange at all, servos are all about positioning, make it a continuously rotating one and you throw most of the functionality away. It is the wrong thing to use, that is there are much better ways of getting the same effect.

I have a usb breakoutboard from sparkfun that powers and serially connects my arduino to the computer. Then I have an external power src of 5v running in my servo. My servo has black, red and white wires so I naturally connect black to ground, red to power and white to arduino. though red is in between black and white, unlike in your diagram.

One thing though is that my servo does not share ground with the arduino, is that a big problem?