The Arduino turns off when I try to put the wire from the servo to its respective pin (9). Also, I've tried the code from the Arduino IDE, the knob code where the position of the motor depends on the value of the potentiometer. I don't really know what's wrong. Every time the servo tries to turn, the Arduino turns off, so the motor only turn for a very small degree, then the Arduino turns on, and so on.
By the way, I'm using an MG996R Tower Pro Digital Servo motor.
Is there a problem with the motor or/and the Arduino? I can't seem to remedy this problem.