Servo Motor 90 Deg Project Help

hey,
i've got already project and i just need to add to it by function (not in the loop area),
gate that will open (from 180 degrees to 90 - rotate 90 degrees left) wait for few seconds and then close back (90 degrees to 180 - rotate 90 degrees right) .

its a little demo to a parking system, and i looking to built a gate.
it need to be small and easy to build.
thank you

You might try something like below'

//zoomkat servo button test 7-30-2011

#include <Servo.h>
int button1 = 4; //button pin, connect to ground to move servo
int press1 = 0;
Servo servo1;

void setup()
{
  pinMode(button1, INPUT);
  servo1.attach(7);
  servo1.write(180);
  digitalWrite(4, HIGH); //enable pullups to make pin high
}

void loop()
{
  press1 = digitalRead(button1);
  if (press1 == LOW)
  {
    servo1.write(90);
    delay(5000);
    servo1.write(180);
  }
}

i need help by thinking what kind of motor is the best for the project,
i tried to work with servo motor but i feel that its hard to adjust him to go 90 degrees and 180 degrees perfectly.

in the other hand, i think that with servo motor i can rotate him to left and the to right without any other device.

so i need to know, maybe i got the wrong servo kind. how servo motor work for you?
can i trust him to move exactly 90 degrees to left and then 90 to right?

ron2man:
can i trust him to move exactly 90 degrees to left and then 90 to right?

Many people rely on them to control expensive model airplanes.

...R

For which no precision is needed, merely repeatability...

MarkT:
For which no precision is needed, merely repeatability...

I suspect they can be interchangeable in this situation. If it is repeatable you can experiment to get the precise settings.

...R

so i need to know, maybe i got the wrong servo kind. how servo motor work for you?
can i trust him to move exactly 90 degrees to left and then 90 to right?

You probably need to use google to learn the details about how servos work before starting your project. How you will use a servo in your project will determine weather a servo will be appropriate or have the accuracy you desire.