STOPPING A SERVO

johnwasser:
The code looks OK so I suspect a hardware problem. nCommon servo mistakes are:

  1. Using the Arduino's +5V pin to power the servo (the servo can cause the Arduino to reset)
  2. Using an external power supply for the servo but forgetting to connect the negative side of that supply to the Arduino Ground.

most of the pages online suggested to power up the servo using the Arduino's +5V pin. if that is a mistake, where should I connect it to ?

thank you.