potentiometer / servo motor help needed

hello
i was hoping to pick someone's brain for a bit of advice. I am working on a project which requires some fairly precise control of a servo motor using a potentiometer. I have recently ordered the following motor from cool components - http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=368 which works great and have just a simple 10k potentiometer. I have been following these instructions online as to how to connect them and the suggested code:
http://luckylarry.co.uk/2009/06/controlling-a-servo-with-arduino/

// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>

#include <Servo.h>

Servo myservo;  // create servo object to control a servo

int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin

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

void loop()
{
val = analogRead(potpin);            // reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 180);     // scale it to use it with the servo (value between 0 and 180)
myservo.write(val);                  // sets the servo position according to the scaled value
delay(15);                           // waits for the servo to get there
}

which have been really useful and I instantly got results. the problem i have encountered is that the motor continues to rotate, so when i turn the potentiometer it seems to controls the speed of the rotation rather than set the position of the motor (which is what I am after). The higher i turn the potentiometer the faster it turns etc. I ran a simple little programme to get a read out to the serial monitor of what data the potentiometer was sending out like this:

int potPin = 0; // select the input pin for the potentiometer 
int val = 0; // variable to store the value coming from the sensor

void setup() { 
Serial.begin(9600); 
}

void loop() {
val = analogRead(potPin); // read the value from the sensor
Serial.print(val,DEC);
Serial.print(" "); 
delay(100); 
}

and it seems to constantly send information as to its position -
eg. 666 666 666 666 666 646 610 571 526 480 435 390 343 294 252 211 175 142 111 79 45 15 0 0 0 0 0 0
which i guess is the problem for the servo motor as it is constantly receiving this information and moves to it. Does anyone have much experience with potentiometers and servo motors - and am I missing something?

It looks like you got the wrong servo. If you want to control the position of the servo over a range of around 180 degrees then you want something like this one: http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=235

What mem said - to call the device you've got a "servo" is misleading.
In engineering terms, a servomechanism has to have a means of feedback to control its speed or position; your device has neither.

What you have is a small motor and gearbox, with a convenient, if possibly imprecise, means of controlling motor direction.

You have absolutely no control over position, unless you add some sort of shaft encoder to it.

This naming problem comes up a lot. When a hobby type R/C servo is modified for continuous rotation is ceases to be a real servo anymore. Instead it becomes a bi-directional variable speed geared motor. With such a modification you can control only the speed and direction (and stopping) of the output shaft, but you can no longer command it to go to specific output position.

Lefty

thanks for all the replies - it is a bit misleading calling it a servo motor. I had read about the modifications you could do to servo motors to make them rotate continuously but i did not realise that the hack would make it work in such a different way. Luckily I have found another use for the motor in the project and as such was not a total waste of £12.