Stumped on my first servo motor project

So I followed this guide on youtube:

The problem I’m seeing is that instead of going from 10degrees to 170degrees at the specified time I get:
The motor jerks every second even though I said every 10 seconds. It jerks forward the whole time until its reached its limits… then it does nothing else.

The motor is a “TowerPro MG995”
According to this spec: it should work fine with 5volts.

Simple servo test code. Also, most standard size servos won’t power well from an arduino. They usually need a seperate power supply.

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

String readString;
#include <Servo.h> 
Servo myservo;  // create servo object to control a servo 

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

void loop() {
  while (Serial.available()) {
    char c =;  //gets one byte from serial buffer
    readString += c; //makes the string readString
    delay(2);  //slow looping to allow buffer to fill with next character

  if (readString.length() >0) {
    Serial.println(readString);  //so you can see the captured string 
    int n = readString.toInt();  //convert readString into a number

    // auto select appropriate value, copied from someone elses code.
    if(n >= 500)
      Serial.print("writing Microseconds: ");
      Serial.print("writing Angle: ");

    readString=""; //empty for next input

You were right Zoomkat. I hooked up an external power supply and it worked.