Unwanted Servo Activation

I am currently working on a BoE (Board of Education) shield bot with the Arduino Uno for a school project. Currently, whenever a program is run, but before it actually begins, the left servo twitches slightly. The twitch lines up with the flashing of an LED below it. The right one is behaving correctly. Any advice on how to solve this?

Edit: Thanks for all of the replies! Unfortunately, I cannot post a picture of the wiring as we are currently on thanksgiving break and I do not have it with me. However, the port in question that it is plugged into is port 13.

My advice is:

  • Properly post your code. (Use code tags, use the Arduino IDE autoformat function which is CTRL-T on a PC).
  • Provide your schematic.
  • Post a photo of your wiring or a wiring diagram.
  • Define BoE. BoE means many things. You probably meant Board of Education but could have meant Bank of England or several other things.

It is usually a bad idea to power servos from an Arduino.
Perhaps you thought that we could solve things with little information but it doesn't work that way for me.

At startup, servos automatically go to the default position of 90 degrees, if your left servo is not already at 90 degrees it will "twitch" there.

Everything that vaj4088 said +1.

Without a wiring diagram and posted code, we cannot tel which pin your servo is connected to.
Some pins have activity during the boot.

Without a wiring diagram, we cannot tell how you are powering the servo. Improperly powered servos account for ~90% of all servo problems.

I think you will find that pin 13 is connected to the onboard LED, this flashes during program loading and booting.

Change the servo to another pin will fix the problem.

Tom.... :slight_smile:

Change the servo to another pin will fix the problem.

And just for clarity, this change will need to be done physically, with where the servo signal wire connects and in code, with the pin number used to perform the servo.attach()

This shield:

With this schematic I think: Download - Parallax

Pin 13 is one of the servo pins on that shield, so this will happen if you use that pin as it
is toggled by the bootloader.

However, the port in question that it is plugged into is port 13.

Ports are B, C and D, you mean pin 13, so yes, its as I thought, can you use other pins?

Once the OP told us that the servo in question was wired to pin 13, the answer became clear.

Once again, this is why we need ALL of the information.